Revision: 138213 https://trac.macports.org/changeset/138213 Author: raphael@macports.org Date: 2015-07-02 07:25:42 -0700 (Thu, 02 Jul 2015) Log Message: ----------- libcryptopp: use dylib extension and set correct install name for shared library (#47773) Modified Paths: -------------- trunk/dports/devel/libcryptopp/Portfile trunk/dports/devel/libcryptopp/files/patch-GNUmakefile.diff Modified: trunk/dports/devel/libcryptopp/Portfile =================================================================== --- trunk/dports/devel/libcryptopp/Portfile 2015-07-02 13:58:45 UTC (rev 138212) +++ trunk/dports/devel/libcryptopp/Portfile 2015-07-02 14:25:42 UTC (rev 138213) @@ -5,7 +5,7 @@ name libcryptopp version 5.6.2 -revision 1 +revision 2 categories devel security platforms darwin maintainers raphael openmaintainer @@ -27,6 +27,9 @@ extract.mkdir yes patchfiles patch-GNUmakefile.diff +post-patch { + reinplace "s|@@PREFIX@@|${prefix}|" ${worksrcpath}/GNUmakefile +} use_configure no @@ -45,7 +48,7 @@ xinstall -m 755 -d ${destroot}${prefix}/include/cryptopp \ ${destroot}${prefix}/share/doc/${name} xinstall -m 644 ${worksrcpath}/libcryptopp.a \ - ${worksrcpath}/libcryptopp.so \ + ${worksrcpath}/libcryptopp.dylib \ ${destroot}${prefix}/lib xinstall -m 644 {*}[glob ${worksrcpath}/*.h] \ ${destroot}${prefix}/include/cryptopp/ Modified: trunk/dports/devel/libcryptopp/files/patch-GNUmakefile.diff =================================================================== --- trunk/dports/devel/libcryptopp/files/patch-GNUmakefile.diff 2015-07-02 13:58:45 UTC (rev 138212) +++ trunk/dports/devel/libcryptopp/files/patch-GNUmakefile.diff 2015-07-02 14:25:42 UTC (rev 138213) @@ -1,5 +1,5 @@ ---- GNUmakefile.orig 2015-05-20 18:10:05.000000000 +0200 -+++ GNUmakefile 2015-05-20 18:10:36.000000000 +0200 +--- GNUmakefile.orig 2015-07-02 15:54:47.000000000 +0200 ++++ GNUmakefile 2015-07-02 16:06:53.000000000 +0200 @@ -1,7 +1,7 @@ -CXXFLAGS = -DNDEBUG -g -O2 +CXXFLAGS += -DNDEBUG -g -O2 @@ -21,3 +21,43 @@ CXXFLAGS += -march=native endif endif +@@ -139,33 +137,33 @@ + + all: cryptest.exe + static: libcryptopp.a +-dynamic: libcryptopp.so ++dynamic: libcryptopp.dylib + + test: cryptest.exe + ./cryptest.exe v + + clean: +- -$(RM) cryptest.exe libcryptopp.a libcryptopp.so $(LIBOBJS) $(TESTOBJS) cryptopp.dll libcryptopp.dll.a libcryptopp.import.a cryptest.import.exe dlltest.exe $(DLLOBJS) $(LIBIMPORTOBJS) $(TESTI MPORTOBJS) $(DLLTESTOBJS) ++ -$(RM) cryptest.exe libcryptopp.a libcryptopp.dylib $(LIBOBJS) $(TESTOBJS) cryptopp.dll libcryptopp.dll.a libcryptopp.import.a cryptest.import.exe dlltest.exe $(DLLOBJS) $(LIBIMPORTOBJS) $(TESTI MPORTOBJS) $(DLLTESTOBJS) + + install: + $(MKDIR) -p $(PREFIX)/include/cryptopp $(PREFIX)/lib $(PREFIX)/bin + -$(CP) *.h $(PREFIX)/include/cryptopp + -$(CP) *.a $(PREFIX)/lib +- -$(CP) *.so $(PREFIX)/lib ++ -$(CP) *.dylib $(PREFIX)/lib + -$(CP) *.exe $(PREFIX)/bin + + remove: + -$(RM) -rf $(PREFIX)/include/cryptopp + -$(RM) $(PREFIX)/lib/libcryptopp.a +- -$(RM) $(PREFIX)/lib/libcryptopp.so ++ -$(RM) $(PREFIX)/lib/libcryptopp.dylib + -$(RM) $(PREFIX)/bin/cryptest.exe + + libcryptopp.a: $(LIBOBJS) + $(AR) $(ARFLAGS) $@ $(LIBOBJS) + $(RANLIB) $@ + +-libcryptopp.so: $(LIBOBJS) +- $(CXX) -shared -o $@ $(LIBOBJS) ++libcryptopp.dylib: $(LIBOBJS) ++ $(CXX) -dynamiclib -install_name @@PREFIX@@/lib/$@ -o $@ $(LIBOBJS) + + cryptest.exe: libcryptopp.a $(TESTOBJS) + $(CXX) -o $@ $(CXXFLAGS) $(TESTOBJS) ./libcryptopp.a $(LDFLAGS) $(LDLIBS)