Christian Weisgerber <[email protected]> writes:

> Jonathan Gray:
>
>> > sys.mk automatically gets included by make(1) and sets CXXFLAGS to
>> > CFLAGS.  If a Makefile defines additional CFLAGS they will then be
>> > passed to the C++ compiler.  Which creates problems with flags
>> > that should only be used by the C compiler in Makefiles that
>> > deal with both C and C++ (like Mesa).
>> > 
>> > Fix this situation by not initialising CXXFLAGS with CFLAGS.
>> > No problems building src/xenocara with the following diff:
>> 
>> Here is the diff again.  If there are concerns on the ports
>> side could someone doing ports bulk builds give this a try?
>
> These ports failed in an amd64 bulk build:

Shortened list:

> net/zeromq
> security/encfs

Both fixes use CONFIGURE_ENV for CPPFLAGS/CXXFLAGS.
The encfs diff includes additional fixes (erroneous format string* +
s/fusermount/umount/).

* May  7 19:56:06 ritchie encfs: Unmounting filesystem /tmp/m/ failed:
  Resource temporarily unavailable

Index: net/zeromq/Makefile
===================================================================
RCS file: /cvs/ports/net/zeromq/Makefile,v
retrieving revision 1.14
diff -u -p -r1.14 Makefile
--- net/zeromq/Makefile 25 Jan 2015 09:36:55 -0000      1.14
+++ net/zeromq/Makefile 7 May 2015 18:03:57 -0000
@@ -7,7 +7,7 @@ SHARED_ONLY =           Yes
 COMMENT =              open source message queue optimised for performance
 
 DISTNAME =             zeromq-4.0.5
-REVISION =             0
+REVISION =             1
 
 SHARED_LIBS +=  zmq                  4.0      # 4.0
 
@@ -27,11 +27,10 @@ LIB_DEPENDS =               security/libsodium
 
 USE_GMAKE =            Yes
 
-# XXX libsodium: https://github.com/jedisct1/libsodium/pull/104
-CFLAGS +=              -Wno-long-long
-
 CONFIGURE_STYLE =      gnu
 CONFIGURE_ARGS =       ${CONFIGURE_SHARED} \
                        --with-libsodium=${LOCALBASE}
+# XXX libsodium: https://github.com/jedisct1/libsodium/pull/104
+CONFIGURE_ENV =                CXXFLAGS="-Wno-long-long ${CXXFLAGS}"
 
 .include <bsd.port.mk>
Index: security/encfs/Makefile
===================================================================
RCS file: /cvs/ports/security/encfs/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- security/encfs/Makefile     21 Jan 2014 15:41:27 -0000      1.3
+++ security/encfs/Makefile     7 May 2015 18:03:57 -0000
@@ -2,7 +2,7 @@
 
 COMMENT =              fuse-based cryptographic filesystem
 DISTNAME =             encfs-1.7.4
-REVISION =             0
+REVISION =             1
 SHARED_LIBS =          encfs   0.0     # 6.1
 CATEGORIES =           security
 HOMEPAGE =             http://www.arg0.net/encfs
@@ -25,10 +25,8 @@ CONFIGURE_ARGS +=    ${CONFIGURE_SHARED} \
                        --with-boost-serialization=boost_serialization \
                        --with-boost-filesystem=boost_filesystem \
                        --with-boost-system=boost_system
-
 # TODO convert code to use utimensat() instead of lutimes()
-CFLAGS =               -Dlutimes=utimes \
-                       -D_DIRENT_HAVE_D_TYPE
+CONFIGURE_ENV +=       CPPFLAGS="-Dlutimes=utimes -D_DIRENT_HAVE_D_TYPE"
 
 do-test:
        ${WRKSRC}/encfs/test
Index: security/encfs/patches/patch-encfs_encfssh
===================================================================
RCS file: security/encfs/patches/patch-encfs_encfssh
diff -N security/encfs/patches/patch-encfs_encfssh
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ security/encfs/patches/patch-encfs_encfssh  7 May 2015 18:03:57 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+
+- no fusermount(1) on OpenBSD, umount(8) is enough
+
+--- encfs/encfssh.orig Sun Nov 29 23:04:12 2009
++++ encfs/encfssh      Thu May  7 19:58:09 2015
+@@ -63,5 +63,5 @@ orig_dir=$(pwd)
+ cd $unenc_dir
+ 
+ # Set the shell up
+-exec /bin/sh -c "$SHELL ; cd $orig_dir ; fusermount -u $unenc_dir ; if ! 
$unenc_dir_given; then rmdir $unenc_dir; fi"
++exec /bin/sh -c "$SHELL ; cd $orig_dir ; umount $unenc_dir ; if ! 
$unenc_dir_given; then rmdir $unenc_dir; fi"
+ 
Index: security/encfs/patches/patch-encfs_main_cpp
===================================================================
RCS file: /cvs/ports/security/encfs/patches/patch-encfs_main_cpp,v
retrieving revision 1.2
diff -u -p -r1.2 patch-encfs_main_cpp
--- security/encfs/patches/patch-encfs_main_cpp 21 Jan 2014 15:41:27 -0000      
1.2
+++ security/encfs/patches/patch-encfs_main_cpp 7 May 2015 18:03:57 -0000
@@ -1,6 +1,6 @@
 $OpenBSD: patch-encfs_main_cpp,v 1.2 2014/01/21 15:41:27 syl Exp $
 --- encfs/main.cpp.orig        Sun Nov 29 23:04:12 2009
-+++ encfs/main.cpp     Mon Jan 13 13:45:50 2014
++++ encfs/main.cpp     Thu May  7 19:19:29 2015
 @@ -28,6 +28,8 @@
  #include <cstdio>
  #include <unistd.h>
@@ -30,7 +30,7 @@ $OpenBSD: patch-encfs_main_cpp,v 1.2 201
 +      if (unmount( arg->mountPoint.c_str(), MNT_FORCE ) != 0)
 +      {
 +          rWarning(_("Unmounting filesystem %s failed: %s"),
-+              strerror(errno) );
++              arg->mountPoint.c_str(), strerror(errno) );
 +      }
        return true;
      }


-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to