Skip to content
Snippets Groups Projects
Commit 50addb39 authored by Edric Milaret's avatar Edric Milaret Committed by gerrit2
Browse files

contrib: deactivate clock_gettime for iOS and macOS

clock_gettime function as been added to MacOS 10.12 and iOS 10
so launching the Ring App would result in symbol not found on OS
before 10

Change-Id: Ifcd841379483ef9b8d17f54ee5b99f0a2526f94a
Tuleap: #911
parent e64b9e6d
No related branches found
No related tags found
No related merge requests found
--- a/configure 2016-08-17 10:38:51.000000000 -0400
+++ b/configure 2016-08-17 10:38:53.000000000 -0400
@@ -5293,7 +5293,7 @@
check_func access
check_func arc4random
-check_func_headers time.h clock_gettime || { check_func_headers time.h clock_gettime -lrt && add_extralibs -lrt && LIBRT="-lrt"; }
+#check_func_headers time.h clock_gettime || { check_func_headers time.h clock_gettime -lrt && add_extralibs -lrt && LIBRT="-lrt"; }
check_func fcntl
check_func fork
check_func gethrtime
...@@ -187,6 +187,12 @@ ffmpeg: ffmpeg-$(FFMPEG_HASH).tar.xz .sum-ffmpeg ...@@ -187,6 +187,12 @@ ffmpeg: ffmpeg-$(FFMPEG_HASH).tar.xz .sum-ffmpeg
(cd $@-$(FFMPEG_HASH) && tar x $(if ${BATCH_MODE},,-v) --strip-components=1 -f ../$<) (cd $@-$(FFMPEG_HASH) && tar x $(if ${BATCH_MODE},,-v) --strip-components=1 -f ../$<)
$(UPDATE_AUTOCONFIG) $(UPDATE_AUTOCONFIG)
$(APPLY) $(SRC)/ffmpeg/0004-avformat-fix-find_stream_info-not-considering-extradata.patch $(APPLY) $(SRC)/ffmpeg/0004-avformat-fix-find_stream_info-not-considering-extradata.patch
ifdef HAVE_IOS
$(APPLY) $(SRC)/ffmpeg/clock_gettime.patch
endif
ifdef HAVE_MACOSX
$(APPLY) $(SRC)/ffmpeg/clock_gettime.patch
endif
$(MOVE) $(MOVE)
.ffmpeg: ffmpeg .ffmpeg: ffmpeg
......
--- a/configure.ac 2016-08-17 11:04:37.000000000 -0400
+++ b/configure.ac 2016-08-17 11:04:33.000000000 -0400
@@ -2798,8 +2798,16 @@
# clock_getres said only 1 millisecond.
old_LIBS="$LIBS"
-AC_SEARCH_LIBS(clock_gettime, rt, [
- AC_DEFINE([HAVE_CLOCK_GETTIME],1,[Define to 1 if you have the `clock_gettime' function])])
+
+AC_ARG_WITH([clock_gettime],
+ AS_HELP_STRING([--without-clock-gettime],
+ [Ignore presence of clock_gettime and disable it]), [], [with_clock_gettime=yes])
+
+AS_IF([test "x$with_clock_gettime" = "xyes"],
+ [AC_SEARCH_LIBS(clock_gettime, rt, [
+ AC_DEFINE([HAVE_CLOCK_GETTIME],1,[Define to 1 if you have the `clock_gettime' function])])],
+ [HAVE_CLOCK_GETTIME=0])
+
TUNE_LIBS="$LIBS"
LIBS="$old_LIBS"
...@@ -10,13 +10,25 @@ $(TARBALLS)/gmp-$(GMP_VERSION).tar.bz2: ...@@ -10,13 +10,25 @@ $(TARBALLS)/gmp-$(GMP_VERSION).tar.bz2:
gmp: gmp-$(GMP_VERSION).tar.bz2 .sum-gmp gmp: gmp-$(GMP_VERSION).tar.bz2 .sum-gmp
$(UNPACK) $(UNPACK)
ifdef HAVE_IOS
$(APPLY) $(SRC)/gmp/clock_gettime.patch
endif
ifdef HAVE_MACOSX
$(APPLY) $(SRC)/gmp/clock_gettime.patch
endif
$(MOVE) $(MOVE)
.gmp: gmp .gmp: gmp
ifdef HAVE_IOS ifdef HAVE_IOS
cd $< && $(HOSTVARS) CFLAGS="$(CFLAGS) -O3" ./configure --disable-assembly $(HOSTCONF) $(RECONF)
cd $< && $(HOSTVARS) CFLAGS="$(CFLAGS) -O3" ./configure --disable-assembly --without-clock-gettime $(HOSTCONF)
else
ifdef HAVE_MACOSX
$(RECONF)
cd $< && $(HOSTVARS) ./configure --without-clock-gettime $(HOSTCONF)
else else
cd $< && $(HOSTVARS) ./configure $(HOSTCONF) cd $< && $(HOSTVARS) ./configure $(HOSTCONF)
endif
endif endif
cd $< && $(MAKE) install cd $< && $(MAKE) install
touch $@ touch $@
...@@ -68,8 +68,16 @@ endif ...@@ -68,8 +68,16 @@ endif
$(RECONF) $(RECONF)
ifdef HAVE_ANDROID ifdef HAVE_ANDROID
cd $< && $(HOSTVARS) gl_cv_header_working_stdint_h=yes ./configure $(GNUTLS_CONF) cd $< && $(HOSTVARS) gl_cv_header_working_stdint_h=yes ./configure $(GNUTLS_CONF)
else
ifdef HAVE_IOS
cd $< && $(HOSTVARS) ac_cv_func_clock_gettime=no CFLAGS="$(CFLAGS)" ./configure $(GNUTLS_CONF)
else
ifdef HAVE_MACOSX
cd $< && $(HOSTVARS) ac_cv_func_clock_gettime=no CFLAGS="$(CFLAGS)" ./configure $(GNUTLS_CONF)
else else
cd $< && $(HOSTVARS) CFLAGS="$(CFLAGS)" ./configure $(GNUTLS_CONF) cd $< && $(HOSTVARS) CFLAGS="$(CFLAGS)" ./configure $(GNUTLS_CONF)
endif
endif
endif endif
cd $</gl && $(MAKE) install cd $</gl && $(MAKE) install
cd $</lib && $(MAKE) install cd $</lib && $(MAKE) install
......
...@@ -21,6 +21,9 @@ sndfile: libsndfile-$(SNDFILE_VERSION).tar.gz .sum-sndfile ...@@ -21,6 +21,9 @@ sndfile: libsndfile-$(SNDFILE_VERSION).tar.gz .sum-sndfile
$(APPLY) $(SRC)/sndfile/autotools.patch $(APPLY) $(SRC)/sndfile/autotools.patch
$(APPLY) $(SRC)/sndfile/disable_programs.patch $(APPLY) $(SRC)/sndfile/disable_programs.patch
$(UPDATE_AUTOCONFIG) && cd $(UNPACK_DIR) && mv config.guess config.sub Cfg && autoreconf -fi $(UPDATE_AUTOCONFIG) && cd $(UNPACK_DIR) && mv config.guess config.sub Cfg && autoreconf -fi
ifdef HAVE_IOS
rm -Rf examples
endif
$(MOVE) $(MOVE)
.sndfile: sndfile .sndfile: sndfile
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment