pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/math/liblinear



Module Name:    pkgsrc
Committed By:   khorben
Date:           Fri Nov 10 16:18:47 UTC 2017

Modified Files:
        pkgsrc/math/liblinear: Makefile distinfo
        pkgsrc/math/liblinear/patches: patch-Makefile patch-blas_Makefile

Log Message:
Add support for CFLAGS and LDFLAGS

This notably fixes building with RELRO enabled.

Bump PKGREVISION, since this generates a different binary now that SSP and
FORTIFY are enabled.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 pkgsrc/math/liblinear/Makefile
cvs rdiff -u -r1.5 -r1.6 pkgsrc/math/liblinear/distinfo
cvs rdiff -u -r1.2 -r1.3 pkgsrc/math/liblinear/patches/patch-Makefile \
    pkgsrc/math/liblinear/patches/patch-blas_Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/math/liblinear/Makefile
diff -u pkgsrc/math/liblinear/Makefile:1.4 pkgsrc/math/liblinear/Makefile:1.5
--- pkgsrc/math/liblinear/Makefile:1.4  Sun May 21 10:40:28 2017
+++ pkgsrc/math/liblinear/Makefile      Fri Nov 10 16:18:47 2017
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.4 2017/05/21 10:40:28 adam Exp $
+# $NetBSD: Makefile,v 1.5 2017/11/10 16:18:47 khorben Exp $
 
 DISTNAME=      liblinear-2.11
+PKGREVISION=   1
 CATEGORIES=    math
 MASTER_SITES=  http://www.csie.ntu.edu.tw/~cjlin/liblinear/
 
@@ -15,6 +16,9 @@ USE_LIBTOOL=  yes
 BUILD_TARGET=  all lib
 AUTO_MKDIRS=   yes
 
+MAKE_FLAGS+=   CFLAGS=${CFLAGS:Q}
+MAKE_FLAGS+=   LDFLAGS=${LDFLAGS:Q}
+
 do-install:
        ${INSTALL_PROGRAM} ${WRKSRC}/predict ${DESTDIR}${PREFIX}/bin/liblinear-predict
        ${INSTALL_PROGRAM} ${WRKSRC}/train ${DESTDIR}${PREFIX}/bin/liblinear-train

Index: pkgsrc/math/liblinear/distinfo
diff -u pkgsrc/math/liblinear/distinfo:1.5 pkgsrc/math/liblinear/distinfo:1.6
--- pkgsrc/math/liblinear/distinfo:1.5  Sun May 21 10:40:28 2017
+++ pkgsrc/math/liblinear/distinfo      Fri Nov 10 16:18:47 2017
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.5 2017/05/21 10:40:28 adam Exp $
+$NetBSD: distinfo,v 1.6 2017/11/10 16:18:47 khorben Exp $
 
 SHA1 (liblinear-2.11.tar.gz) = 6c306d0d0b7ea5281ee2b587adc89745ee0d74fa
 RMD160 (liblinear-2.11.tar.gz) = c80d051e8b354de03da3e41bd1bea096ef4076f3
 SHA512 (liblinear-2.11.tar.gz) = c5a33e98ae3c792173d38060b6002cf63af4571b42cdf313f6e5fd8ee5ac7b86caa99d123a028a6ecb3843aac0f839c9ff655f5fb28cfdf26ca7a6cb5f3f359d
 Size (liblinear-2.11.tar.gz) = 506509 bytes
-SHA1 (patch-Makefile) = 88e7188f9e5a8bb5da90a1cac23a5de98dbe5817
-SHA1 (patch-blas_Makefile) = b52b5e18a47c075241adbfcdcf8f70e6fe849711
+SHA1 (patch-Makefile) = 1f10259764b0ca07874da35d35b76d4054e92117
+SHA1 (patch-blas_Makefile) = d829bdf80671d1eb95e78e4a7592f6fd3ffb7c46

Index: pkgsrc/math/liblinear/patches/patch-Makefile
diff -u pkgsrc/math/liblinear/patches/patch-Makefile:1.2 pkgsrc/math/liblinear/patches/patch-Makefile:1.3
--- pkgsrc/math/liblinear/patches/patch-Makefile:1.2    Thu Jan 28 11:34:48 2016
+++ pkgsrc/math/liblinear/patches/patch-Makefile        Fri Nov 10 16:18:47 2017
@@ -1,10 +1,11 @@
-$NetBSD: patch-Makefile,v 1.2 2016/01/28 11:34:48 jperkin Exp $
+$NetBSD: patch-Makefile,v 1.3 2017/11/10 16:18:47 khorben Exp $
 
 Use LIBTOOL.
+Add support for LDFLAGS.
 
---- Makefile.orig      2015-09-26 22:03:26.000000000 +0000
+--- Makefile.orig      2017-03-28 22:22:33.000000000 +0000
 +++ Makefile
-@@ -1,34 +1,27 @@
+@@ -1,37 +1,30 @@
  CXX ?= g++
  CC ?= gcc
 -CFLAGS = -Wall -Wconversion -O3 -fPIC
@@ -30,17 +31,17 @@ Use LIBTOOL.
 -predict: tron.o linear.o predict.c blas/blas.a
 -      $(CXX) $(CFLAGS) -o predict predict.c tron.o linear.o $(LIBS)
 +lib: linear.lo tron.lo $(LIBS)
-+      ${LIBTOOL} --mode=link $(CXX) -o liblinear.la $> -rpath ${PREFIX}/lib -version-info ${SHVER}:0
++      ${LIBTOOL} --mode=link $(CXX) -o liblinear.la $(LDFLAGS) $> -rpath ${PREFIX}/lib -version-info ${SHVER}:0
  
 -tron.o: tron.cpp tron.h
 -      $(CXX) $(CFLAGS) -c -o tron.o tron.cpp
 +train: tron.lo linear.lo train.c $(LIBS)
-+      ${LIBTOOL} --mode=link $(CXX) $(CFLAGS) -o train $>
++      ${LIBTOOL} --mode=link $(CXX) $(CFLAGS) -o train $(LDFLAGS) $>
  
 -linear.o: linear.cpp linear.h
 -      $(CXX) $(CFLAGS) -c -o linear.o linear.cpp
 +predict: tron.lo linear.lo predict.c $(LIBS)
-+      ${LIBTOOL} --mode=link $(CXX) $(CFLAGS) -o predict $>
++      ${LIBTOOL} --mode=link $(CXX) $(CFLAGS) -o predict $(LDFLAGS) $>
  
 -blas/blas.a: blas/*.c blas/*.h
 +tron.lo: tron.cpp tron.h
@@ -53,3 +54,8 @@ Use LIBTOOL.
        make -C blas OPTFLAGS='$(CFLAGS)' CC='$(CC)';
  
  clean:
+-      make -C blas clean
+-      make -C matlab clean
++      $(MAKE) -C blas clean
++      $(MAKE) -C matlab clean
+       rm -f *~ tron.o linear.o train predict liblinear.so.$(SHVER)
Index: pkgsrc/math/liblinear/patches/patch-blas_Makefile
diff -u pkgsrc/math/liblinear/patches/patch-blas_Makefile:1.2 pkgsrc/math/liblinear/patches/patch-blas_Makefile:1.3
--- pkgsrc/math/liblinear/patches/patch-blas_Makefile:1.2       Sun May 21 10:40:28 2017
+++ pkgsrc/math/liblinear/patches/patch-blas_Makefile   Fri Nov 10 16:18:47 2017
@@ -1,6 +1,7 @@
-$NetBSD: patch-blas_Makefile,v 1.2 2017/05/21 10:40:28 adam Exp $
+$NetBSD: patch-blas_Makefile,v 1.3 2017/11/10 16:18:47 khorben Exp $
 
 Use LIBTOOL.
+Add support for LDFLAGS.
 
 --- blas/Makefile.orig 2017-03-28 22:22:33.000000000 +0000
 +++ blas/Makefile
@@ -12,7 +13,7 @@ Use LIBTOOL.
 -      $(AR) blas.a $(FILES)
 -      $(RANLIB) blas.a
 +blas: $(FILES:.o=.lo) $(HEADERS)
-+      $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -o libblas.la $(FILES:.o=.lo)
++      $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -o libblas.la $(LDFLAGS) $(FILES:.o=.lo)
  
  clean:
        - rm -f *.o



Home | Main Index | Thread Index | Old Index