[154216] trunk/dports/math/TinySVM

ryandesign at macports.org ryandesign at macports.org
Mon Oct 24 16:38:29 CEST 2016


Revision: 154216
          https://trac.macports.org/changeset/154216
Author:   ryandesign at macports.org
Date:     2016-10-24 16:38:29 +0200 (Mon, 24 Oct 2016)
Log Message:
-----------
TinySVM: Fix build on Sierra.

Remove questionable build system sanity test which fails on Sierra.

Resolves #52692

Move a reinplace to the existing patchfile.

autoreconf to allow building shared library.

Modified Paths:
--------------
    trunk/dports/math/TinySVM/Portfile

Added Paths:
-----------
    trunk/dports/math/TinySVM/files/patch-aclocal.m4.diff
    trunk/dports/math/TinySVM/files/patch-configure.ac.diff

Removed Paths:
-------------
    trunk/dports/math/TinySVM/files/patch-configure.diff

Modified: trunk/dports/math/TinySVM/Portfile
===================================================================
--- trunk/dports/math/TinySVM/Portfile	2016-10-24 14:15:58 UTC (rev 154215)
+++ trunk/dports/math/TinySVM/Portfile	2016-10-24 14:38:29 UTC (rev 154216)
@@ -5,6 +5,7 @@
 
 name                TinySVM
 version             0.09
+revision            1
 categories          math
 platforms           darwin
 maintainers         hum openmaintainer
@@ -24,16 +25,16 @@
 checksums           sha1    9c3c36454c475180ef6646d059376f35549cad08 \
                     rmd160  d44586810d4776a251cda4a08b1aa9148108c8e6
 
-# respect build_arch / universal_archs
-patchfiles          patch-configure.diff
-
-post-patch {
-    reinplace "s|-O9||g" ${worksrcpath}/configure
+post-extract {
+    move ${worksrcpath}/configure.in ${worksrcpath}/configure.ac
 }
 
-configure.args      --disable-shared \
-                    --mandir=${prefix}/share/man
+patchfiles          patch-aclocal.m4.diff \
+                    patch-configure.ac.diff
 
+# Teach configure script how to build modern dylibs.
+use_autoreconf      yes
+
 configure.cppflags-append -D__GNU_LIBRARY__
 
 test.run            yes

Added: trunk/dports/math/TinySVM/files/patch-aclocal.m4.diff
===================================================================
--- trunk/dports/math/TinySVM/files/patch-aclocal.m4.diff	                        (rev 0)
+++ trunk/dports/math/TinySVM/files/patch-aclocal.m4.diff	2016-10-24 14:38:29 UTC (rev 154216)
@@ -0,0 +1,54 @@
+Remove questionable build system sanity test which causes the build to
+fail on Sierra.
+--- aclocal.m4.orig	2002-08-20 01:01:53.000000000 -0500
++++ aclocal.m4	2016-10-24 09:20:01.000000000 -0500
+@@ -43,49 +43,6 @@
+ AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
+ AC_REQUIRE([AC_PROG_MAKE_SET])])
+ 
+-#
+-# Check to make sure that the build environment is sane.
+-#
+-
+-AC_DEFUN([AM_SANITY_CHECK],
+-[AC_MSG_CHECKING([whether build environment is sane])
+-# Just in case
+-sleep 1
+-echo timestamp > conftestfile
+-# Do `set' in a subshell so we don't clobber the current shell's
+-# arguments.  Must try -L first in case configure is actually a
+-# symlink; some systems play weird games with the mod time of symlinks
+-# (eg FreeBSD returns the mod time of the symlink's containing
+-# directory).
+-if (
+-   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+-   if test "[$]*" = "X"; then
+-      # -L didn't work.
+-      set X `ls -t $srcdir/configure conftestfile`
+-   fi
+-   if test "[$]*" != "X $srcdir/configure conftestfile" \
+-      && test "[$]*" != "X conftestfile $srcdir/configure"; then
+-
+-      # If neither matched, then we have a broken ls.  This can happen
+-      # if, for instance, CONFIG_SHELL is bash and it inherits a
+-      # broken ls alias from the environment.  This has actually
+-      # happened.  Such a system could not be considered "sane".
+-      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+-alias in your environment])
+-   fi
+-
+-   test "[$]2" = conftestfile
+-   )
+-then
+-   # Ok.
+-   :
+-else
+-   AC_MSG_ERROR([newly created file is older than distributed files!
+-Check your system clock])
+-fi
+-rm -f conftest*
+-AC_MSG_RESULT(yes)])
+-
+ dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
+ dnl The program must properly implement --version.
+ AC_DEFUN([AM_MISSING_PROG],

Copied: trunk/dports/math/TinySVM/files/patch-configure.ac.diff (from rev 154215, trunk/dports/math/TinySVM/files/patch-configure.diff)
===================================================================
--- trunk/dports/math/TinySVM/files/patch-configure.ac.diff	                        (rev 0)
+++ trunk/dports/math/TinySVM/files/patch-configure.ac.diff	2016-10-24 14:38:29 UTC (rev 154216)
@@ -0,0 +1,15 @@
+Respect user-supplied CFLAGS and CXXFLAGS, and do not try to use -O9
+which clang does not like.
+--- configure.ac.orig	2002-08-20 00:58:13.000000000 -0500
++++ configure.ac	2016-10-24 09:19:02.000000000 -0500
+@@ -82,8 +82,8 @@
+ dnl check gcc
+ dnl
+ if test -n "$GCC"; then
+-   CFLAGS="-Wall -O9 -funroll-all-loops -finline -ffast-math"
+-   CXXFLAGS="-Wall -O9 -funroll-all-loops -finline -ffast-math"
++   CFLAGS="$CFLAGS -Wall -funroll-all-loops -finline -ffast-math"
++   CXXFLAGS="$CXXFLAGS -Wall -funroll-all-loops -finline -ffast-math"
+ fi
+ 
+ # On Intel systems with gcc, we may need to compile with -mieee-fp to

Deleted: trunk/dports/math/TinySVM/files/patch-configure.diff
===================================================================
--- trunk/dports/math/TinySVM/files/patch-configure.diff	2016-10-24 14:15:58 UTC (rev 154215)
+++ trunk/dports/math/TinySVM/files/patch-configure.diff	2016-10-24 14:38:29 UTC (rev 154216)
@@ -1,13 +0,0 @@
---- configure.orig	2002-08-20 01:01:54.000000000 -0500
-+++ configure	2011-04-19 02:33:14.000000000 -0500
-@@ -6105,8 +6105,8 @@
- 
- 
- if test -n "$GCC"; then
--   CFLAGS="-Wall -O9 -funroll-all-loops -finline -ffast-math"
--   CXXFLAGS="-Wall -O9 -funroll-all-loops -finline -ffast-math"
-+   CFLAGS="$CFLAGS -Wall -O9 -funroll-all-loops -finline -ffast-math"
-+   CXXFLAGS="$CXXFLAGS -Wall -O9 -funroll-all-loops -finline -ffast-math"
- fi
- 
- # On Intel systems with gcc, we may need to compile with -mieee-fp to
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-changes/attachments/20161024/d305ab22/attachment-0002.html>


More information about the macports-changes mailing list