Browse Source

Fix P4A-806: Add patch to remove versioning on Android build

Also some Makefile cleanup
JNI-88
Hussein Kasem 3 years ago
parent
commit
a3e977d190
3 changed files with 85 additions and 12 deletions
  1. +14
    -12
      android/external/Makefile
  2. +50
    -0
      android/external/nettle-3.4.1-remove-so-versioning-link.patch
  3. +21
    -0
      android/external/nettle-3.4.1-remove-so-versioning.patch

+ 14
- 12
android/external/Makefile View File

@ -139,29 +139,29 @@ libiconv/Makefile: libiconv.src.stamp
--with-lib-path=$(LOCAL)/lib \
--with-include-path=$(LOCAL)/include \
--host=$(HOST) \
--enable-static \
--disable-shared \
--prefix=$(LOCAL)
libiconv/lib/.libs/libiconv.so: libiconv/Makefile
libiconv/lib/.libs/libiconv.a: libiconv/Makefile
$(MAKE) -C libiconv
$(LOCAL)/lib/libiconv.so: libiconv/lib/.libs/libiconv.so
$(LOCAL)/lib/libiconv.a: libiconv/lib/.libs/libiconv.a
$(MAKE) -C libiconv DESTDIR=$(DESTDIR) prefix=$(prefix) install
ls -l $(LOCAL)/lib/libiconv.so
ls -l $(LOCAL)/lib/libiconv.a
libiconv-build: libiconv/lib/.libs/libiconv.so
libiconv-build: libiconv/lib/.libs/libiconv.a
libiconv-install: $(LOCAL)/lib/libiconv.so
libiconv-install: $(LOCAL)/lib/libiconv.a
#------------------------------------------------------------------------------#
# libetpan
EXTERNAL_GIT_REPOS += libetpan|https://github.com/fdik/libetpan.git?HEAD
libetpan/Makefile: libetpan.src.stamp libiconv-install
libetpan/Makefile: libetpan.src.stamp
cd libetpan/build-android; ICONV_PREFIX=$(LOCAL) bash ./build.sh
touch libetpan.src.stamp
touch libicon-install
touch libetpan/Makefile
libetpan-build: libetpan/Makefile
@ -333,6 +333,8 @@ EXTERNAL_SRCS += nettle-src
EXTERNAL_SRCS_CLEAN += nettle-clean
nettle/Makefile: nettle.src.stamp
-patch -N -p1 --reject-file=- nettle/configure.ac nettle-3.4.1-remove-so-versioning.patch
-patch -N -p1 --reject-file=- nettle/Makefile.in nettle-3.4.1-remove-so-versioning-link.patch
cd nettle && \
CC="$(CC)" LD="$(LD)" AR="$(AR)" AS="$(AS)" RANLIB=$(RANLIB) STRIP="$(STRIP)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
./configure \
@ -344,13 +346,12 @@ nettle/Makefile: nettle.src.stamp
nettle/libnettle.so: nettle/Makefile
$(MAKE) -C nettle
$(LOCAL)/lib/libnettle.so: nettle/libnettle.so
$(LOCAL)/lib/libnettle.so: nettle/libnettle.so nettle/libhogweed.so
$(MAKE) -C nettle DESTDIR=$(DESTDIR) prefix=$(prefix) install
ls -l $(LOCAL)/lib/libnettle.so
nettle-build: nettle/libnettle.so
nettle-build: nettle/libnettle.so nettle/libhogweed.so
nettle-install: $(LOCAL)/lib/libnettle.so
nettle-install: $(LOCAL)/lib/libnettle.so $(LOCAL)/lib/libhogweed.so
#------------------------------------------------------------------------------#
@ -477,6 +478,7 @@ clean-all: clean
.PHONY = clean clean-install clean-assets libetpan-cleanzip\
libiconv-build libiconv-install \
libetpan-build libetpan-install \
uuid-build uuid-prebuild uuid-install \
gmp-build gmp-install \
sequoia-deps-build \


+ 50
- 0
android/external/nettle-3.4.1-remove-so-versioning-link.patch View File

@ -0,0 +1,50 @@
--- nettle/Makefile.in 2018-12-04 21:56:06.000000000 +0100
+++ Makefile.in 2019-07-23 08:10:33.271656999 +0200
@@ -266,10 +266,7 @@
-mkdir .lib 2>/dev/null
(cd .lib \
&& rm -f $(LIBNETTLE_FORLINK) \
- && $(LN_S) ../$(LIBNETTLE_FORLINK) $(LIBNETTLE_FORLINK) \
- && [ -z "$(LIBNETTLE_SONAME)" ] \
- || { rm -f $(LIBNETTLE_SONAME) \
- && $(LN_S) $(LIBNETTLE_FORLINK) $(LIBNETTLE_SONAME) ; } )
+ && $(LN_S) ../$(LIBNETTLE_FORLINK) $(LIBNETTLE_FORLINK) )
echo nettle > libnettle.stamp
$(LIBHOGWEED_FORLINK): $(hogweed_OBJS) $(LIBNETTLE_FORLINK)
@@ -277,10 +274,7 @@
-mkdir .lib 2>/dev/null
(cd .lib \
&& rm -f $(LIBHOGWEED_FORLINK) \
- && $(LN_S) ../$(LIBHOGWEED_FORLINK) $(LIBHOGWEED_FORLINK) \
- && [ -z "$(LIBHOGWEED_SONAME)" ] \
- || { rm -f $(LIBHOGWEED_SONAME) \
- && $(LN_S) $(LIBHOGWEED_FORLINK) $(LIBHOGWEED_SONAME) ; } )
+ && $(LN_S) ../$(LIBHOGWEED_FORLINK) $(LIBHOGWEED_FORLINK) )
echo hogweed > libhogweed.stamp
# For Solaris and BSD make, we have to use an explicit rule for each
@@ -462,11 +456,6 @@
install-shared-nettle: $(LIBNETTLE_FORLINK) @IF_DLL@ install-dll-nettle
$(MKDIR_P) $(DESTDIR)$(libdir)
$(INSTALL_DATA) $(LIBNETTLE_FILE_SRC) $(DESTDIR)$(libdir)/$(LIBNETTLE_FILE)
- [ -z "$(LIBNETTLE_SONAME)" ] \
- || (cd $(DESTDIR)$(libdir) \
- && rm -f $(LIBNETTLE_SONAME) $(LIBNETTLE_FORLINK) \
- && $(LN_S) $(LIBNETTLE_FILE) $(LIBNETTLE_SONAME) \
- && $(LN_S) $(LIBNETTLE_FILE) $(LIBNETTLE_FORLINK))
install-dll-hogweed:
$(MKDIR_P) $(DESTDIR)$(bindir)
@@ -475,11 +464,6 @@
install-shared-hogweed: $(LIBHOGWEED_FORLINK) @IF_DLL@ install-dll-hogweed
$(MKDIR_P) $(DESTDIR)$(libdir)
$(INSTALL_DATA) $(LIBHOGWEED_FILE_SRC) $(DESTDIR)$(libdir)/$(LIBHOGWEED_FILE)
- [ -z "$(LIBHOGWEED_SONAME)" ] \
- || (cd $(DESTDIR)$(libdir) \
- && rm -f $(LIBHOGWEED_SONAME) $(LIBHOGWEED_FORLINK) \
- && $(LN_S) $(LIBHOGWEED_FILE) $(LIBHOGWEED_SONAME) \
- && $(LN_S) $(LIBHOGWEED_FILE) $(LIBHOGWEED_FORLINK))
# I'd like to use makes VPATH search to locate the files to be
# installed. But it seems most make programs don't set $<, $^, $? and

+ 21
- 0
android/external/nettle-3.4.1-remove-so-versioning.patch View File

@ -0,0 +1,21 @@
--- nettle/configure.ac 2018-12-04 21:56:06.000000000 +0100
+++ configure.ac 2019-07-22 14:28:19.390356763 +0200
@@ -650,14 +650,14 @@
;;
*)
LIBNETTLE_FORLINK=libnettle.so
- LIBNETTLE_SONAME='$(LIBNETTLE_FORLINK).$(LIBNETTLE_MAJOR)'
- LIBNETTLE_FILE='$(LIBNETTLE_SONAME).$(LIBNETTLE_MINOR)'
+ LIBNETTLE_SONAME='$(LIBNETTLE_FORLINK)'
+ LIBNETTLE_FILE='$(LIBNETTLE_SONAME)'
LIBNETTLE_LINK='$(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname=$(LIBNETTLE_SONAME)'
LIBNETTLE_LIBS=''
LIBHOGWEED_FORLINK=libhogweed.so
- LIBHOGWEED_SONAME='$(LIBHOGWEED_FORLINK).$(LIBHOGWEED_MAJOR)'
- LIBHOGWEED_FILE='$(LIBHOGWEED_SONAME).$(LIBHOGWEED_MINOR)'
+ LIBHOGWEED_SONAME='$(LIBHOGWEED_FORLINK)'
+ LIBHOGWEED_FILE='$(LIBHOGWEED_SONAME)'
LIBHOGWEED_LINK='$(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname=$(LIBHOGWEED_SONAME)'
# Requested by debian, to make linking with only -lhogweed work
# (does not work in general, e.g., with static linking all of

Loading…
Cancel
Save