mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
extra/crypto++ fixes
This commit is contained in:
parent
df4decaaf4
commit
6e5b52f41d
2 changed files with 43 additions and 47 deletions
|
@ -9,8 +9,6 @@
|
|||
# - fix_build_system.patch to use libtool for compilation
|
||||
# - removed making libcryptopp.so, adjusted packaging for .libs
|
||||
|
||||
plugrel=1
|
||||
|
||||
pkgname=crypto++
|
||||
pkgver=5.6.2
|
||||
_srcver=562
|
||||
|
@ -24,15 +22,15 @@ makedepends=('unzip')
|
|||
source=("http://www.cryptopp.com/cryptopp${_srcver}.zip"
|
||||
'libcrypto++.pc'
|
||||
'fix_build_system.patch')
|
||||
md5sums=('96cbeba0907562b077e26bcffb483828'
|
||||
md5sums=('7ed022585698df48e65ce9218f6c6a67'
|
||||
'46de3847c59ad16456fa863eb33e73b2'
|
||||
'8d454c524bafc05aa842ddfc63d8431d')
|
||||
'7ba22254fea73c1a9bd308ff6e034856')
|
||||
|
||||
build() {
|
||||
cd ${srcdir}
|
||||
|
||||
# ALARM
|
||||
patch -p0 -i fix_build_system.patch
|
||||
patch -p1 -i fix_build_system.patch
|
||||
|
||||
sed -i -e 's/^CXXFLAGS/#CXXFLAGS/' GNUmakefile
|
||||
export CXXFLAGS="${CXXFLAGS} -DNDEBUG -fPIC"
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
--- GNUmakefile
|
||||
+++ GNUmakefile
|
||||
--- cryptopp562/GNUmakefile
|
||||
+++ cryptopp562/GNUmakefile
|
||||
@@ -1,3 +1,5 @@
|
||||
+LIBTOOL = libtool
|
||||
+LIBDIR = lib
|
||||
CXXFLAGS = -DNDEBUG -g -O2
|
||||
#CXXFLAGS = -g
|
||||
# -O3 fails to link on Cygwin GCC version 4.5.3
|
||||
# -fPIC is supported. Please report any breakage of -fPIC as a bug.
|
||||
@@ -7,8 +9,9 @@
|
||||
# LDFLAGS += -Wl,--gc-sections
|
||||
|
@ -17,35 +17,19 @@
|
|||
EGREP = egrep
|
||||
UNAME = $(shell uname)
|
||||
ISX86 = $(shell uname -m | $(EGREP) -c "i.86|x86|i86|amd64")
|
||||
@@ -77,8 +80,11 @@
|
||||
CXXFLAGS += -pipe
|
||||
@@ -79,8 +82,11 @@
|
||||
LDLIBS += -lws2_32
|
||||
endif
|
||||
|
||||
+THREAD_LIBS =
|
||||
+
|
||||
ifeq ($(UNAME),Linux)
|
||||
ifeq ($(IS_LINUX),1)
|
||||
LDFLAGS += -pthread
|
||||
+THREAD_LIBS += -lpthread
|
||||
ifneq ($(shell uname -i | $(EGREP) -c "(_64|d64)"),0)
|
||||
M32OR64 = -m64
|
||||
endif
|
||||
@@ -99,8 +105,6 @@
|
||||
ifeq ($(UNAME),SunOS)
|
||||
LDLIBS += -lnsl -lsocket
|
||||
M32OR64 = -m$(shell isainfo -b)
|
||||
-endif
|
||||
-
|
||||
ifneq ($(IS_SUN_CC),0) # override flags for CC Sun C++ compiler
|
||||
CXXFLAGS = -DNDEBUG -O -g0 -native -template=no%extdef $(M32OR64)
|
||||
LDFLAGS =
|
||||
@@ -114,52 +118,52 @@
|
||||
CXXFLAGS += -DCRYPTOPP_INCLUDE_VECTOR_CC
|
||||
endif
|
||||
endif
|
||||
+endif
|
||||
|
||||
SRCS = $(wildcard *.cpp)
|
||||
ifeq ($(SRCS),) # workaround wildcard function bug in GNU Make 3.77
|
||||
@@ -126,54 +132,52 @@
|
||||
SRCS = $(shell echo *.cpp)
|
||||
endif
|
||||
|
||||
|
@ -62,12 +46,15 @@
|
|||
-LIBIMPORTOBJS = $(LIBOBJS:.o=.import.o)
|
||||
-TESTIMPORTOBJS = $(TESTOBJS:.o=.import.o)
|
||||
-DLLTESTOBJS = dlltest.dllonly.o
|
||||
-
|
||||
-all: cryptest.exe
|
||||
-static: libcryptopp.a
|
||||
-dynamic: libcryptopp.so
|
||||
+DLLOBJS = $(DLLSRCS:.cpp=.export.lo)
|
||||
+LIBIMPORTOBJS = $(LIBOBJS:.lo=.import.lo)
|
||||
+TESTIMPORTOBJS = $(TESTOBJS:.lo=.import.lo)
|
||||
+DLLTESTOBJS = dlltest.dllonly.lo
|
||||
|
||||
-all: cryptest.exe
|
||||
+
|
||||
+all: libcryptopp.la
|
||||
|
||||
-test: cryptest.exe
|
||||
|
@ -76,27 +63,38 @@
|
|||
+ ./cryptest v
|
||||
|
||||
clean:
|
||||
- $(RM) cryptest.exe libcryptopp.a $(LIBOBJS) $(TESTOBJS) cryptopp.dll libcryptopp.dll.a libcryptopp.import.a cryptest.import.exe dlltest.exe $(DLLOBJS) $(LIBIMPORTOBJS) $(TESTIMPORTOBJS) $(DLLTESTOBJS)
|
||||
+ $(RM) -f .libs cryptest libcrypto++.* libcryptopp.* $(LIBOBJS) $(TESTOBJS) cryptopp.dll cryptest.import dlltest $(DLLOBJS) $(LIBIMPORTOBJS) $(TESTIMPORTOBJS) $(DLLTESTOBJS)
|
||||
- -$(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) -f .libs cryptest libcryptopp.* libcryptopp.* $(LIBOBJS) $(TESTOBJS) cryptopp.dll cryptest.import dlltest $(DLLOBJS) $(LIBIMPORTOBJS) $(TESTIMPORTOBJS) $(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) *.exe $(PREFIX)/bin
|
||||
- -$(CP) *.h $(PREFIX)/include/cryptopp
|
||||
- -$(CP) *.a $(PREFIX)/lib
|
||||
- -$(CP) *.so $(PREFIX)/lib
|
||||
- -$(CP) *.exe $(PREFIX)/bin
|
||||
+ $(MKDIR) -p $(DESTDIR)$(PREFIX)/include/cryptopp $(DESTDIR)$(PREFIX)/$(LIBDIR)
|
||||
+ $(INSTALL) -m 644 *.h $(DESTDIR)$(PREFIX)/include/cryptopp
|
||||
+ $(LN_S) cryptopp $(DESTDIR)$(PREFIX)/include/cryptopp
|
||||
+ $(LIBTOOL) --mode=install $(INSTALL) libcryptopp.la $(DESTDIR)$(PREFIX)/$(LIBDIR)
|
||||
+ $(LN_S) libcryptopp.a $(DESTDIR)$(PREFIX)/$(LIBDIR)/libcryptopp.a
|
||||
+ $(LN_S) libcryptopp.so.0.0.0 $(DESTDIR)$(PREFIX)/$(LIBDIR)/libcryptopp.so
|
||||
+ $(LN_S) libcryptopp.so.0.0.0 $(DESTDIR)$(PREFIX)/$(LIBDIR)/libcryptopp.so.0
|
||||
+ $(LN_S) libcryptopp.so.0.0.0 $(DESTDIR)$(PREFIX)/$(LIBDIR)/libcryptopp.so.0.0.0
|
||||
|
||||
remove:
|
||||
- -$(RM) -rf $(PREFIX)/include/cryptopp
|
||||
- -$(RM) $(PREFIX)/lib/libcryptopp.a
|
||||
- -$(RM) $(PREFIX)/lib/libcryptopp.so
|
||||
- -$(RM) $(PREFIX)/bin/cryptest.exe
|
||||
-
|
||||
-libcryptopp.a: $(LIBOBJS)
|
||||
- $(AR) $(ARFLAGS) $@ $(LIBOBJS)
|
||||
- $(RANLIB) $@
|
||||
+ $(MKDIR) -p $(DESTDIR)$(PREFIX)/include/crypto++ $(DESTDIR)$(PREFIX)/$(LIBDIR)
|
||||
+ $(INSTALL) -m 644 *.h $(DESTDIR)$(PREFIX)/include/crypto++
|
||||
+ $(LN_S) crypto++ $(DESTDIR)$(PREFIX)/include/cryptopp
|
||||
+ $(LIBTOOL) --mode=install $(INSTALL) libcrypto++.la $(DESTDIR)$(PREFIX)/$(LIBDIR)
|
||||
+ $(LN_S) libcrypto++.a $(DESTDIR)$(PREFIX)/$(LIBDIR)/libcryptopp.a
|
||||
+ $(LN_S) libcrypto++.so.0.0.0 $(DESTDIR)$(PREFIX)/$(LIBDIR)/libcryptopp.so
|
||||
+ $(LN_S) libcrypto++.so.0.0.0 $(DESTDIR)$(PREFIX)/$(LIBDIR)/libcryptopp.so.0
|
||||
+ $(LN_S) libcrypto++.so.0.0.0 $(DESTDIR)$(PREFIX)/$(LIBDIR)/libcryptopp.so.0.0.0
|
||||
+ $(RM) -rf $(DESTDIR)$(PREFIX)/include/cryptopp
|
||||
+ $(RM) $(DESTDIR)$(PREFIX)/$(LIBDIR)/libcryptopp.a
|
||||
+ $(RM) $(DESTDIR)$(PREFIX)/$(LIBDIR)/libcryptopp.so*
|
||||
+ $(RM) $(DESTDIR)$(PREFIX)/bin/cryptest
|
||||
|
||||
-libcryptopp.so: $(LIBOBJS)
|
||||
- $(CXX) -shared -o $@ $(LIBOBJS)
|
||||
|
@ -104,7 +102,7 @@
|
|||
+ $(LIBTOOL) --tag=CXX --mode=link $(CXX) $(LDFLAGS) -rpath $(PREFIX)/$(LIBDIR) -o $@ $(LIBOBJS) $(THREAD_LIBS)
|
||||
|
||||
-cryptest.exe: libcryptopp.a $(TESTOBJS)
|
||||
- $(CXX) -o $@ $(CXXFLAGS) $(TESTOBJS) -L. -lcryptopp $(LDFLAGS) $(LDLIBS)
|
||||
- $(CXX) -o $@ $(CXXFLAGS) $(TESTOBJS) ./libcryptopp.a $(LDFLAGS) $(LDLIBS)
|
||||
+cryptest: libcryptopp.la $(TESTOBJS)
|
||||
+ $(LIBTOOL) --tag=CXX --mode=link $(CXX) $(LDFLAGS) -o $@ $(TESTOBJS) -L. -lcryptopp $(LDLIBS) $(THREAD_LIBS)
|
||||
|
||||
|
@ -117,7 +115,7 @@
|
|||
|
||||
cryptopp.dll: $(DLLOBJS)
|
||||
$(CXX) -shared -o $@ $(CXXFLAGS) $(DLLOBJS) $(LDFLAGS) $(LDLIBS) -Wl,--out-implib=libcryptopp.dll.a
|
||||
@@ -168,10 +172,10 @@
|
||||
@@ -182,10 +186,10 @@
|
||||
$(AR) $(ARFLAGS) $@ $(LIBIMPORTOBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
|
@ -130,7 +128,7 @@
|
|||
$(CXX) -o $@ $(CXXFLAGS) $(DLLTESTOBJS) -L. -lcryptopp.dll $(LDFLAGS) $(LDLIBS)
|
||||
|
||||
adhoc.cpp: adhoc.cpp.proto
|
||||
@@ -181,14 +185,14 @@
|
||||
@@ -195,14 +199,14 @@
|
||||
touch adhoc.cpp
|
||||
endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue