Commit c16439ab authored by Damien Fouilleul's avatar Damien Fouilleul

- contribs: misc fixes for cygwin mostly

parent cd720479
......@@ -129,6 +129,7 @@ case $HOST in
;;
i686-pc-cygwin)
echo "HAVE_WIN32 = 1" >> config.mak
echo "HAVE_CYGWIN = 1" >> config.mak
CC="gcc -mno-cygwin -isystem /usr/include/mingw"
CXX="g++ -mno-cygwin -isystem /usr/include/mingw"
HOST=`$CC -dumpmachine`
......
......@@ -99,14 +99,14 @@ ifneq ($(BUILD),$(HOST))
# Compiling for MinGW under Cygwin could be deemed as cross compiling
# unfortunately there isn't a complete separate GCC toolchain for MinGW under Cygwin
#
ifeq ($(findstring cygwin,$(BUILD)),)
ifndef HAVE_CYGWIN
# We are REALLY cross compiling
FFMPEGCONF=--cross-prefix=$(HOST)-
X264CONF=--crosscompile=$(HOST)
PTHREADSCONF="CROSS=$(HOST)-"
PTHREADSCONF="CROSS=$(HOST)-"
else
# We are compiling for MinGW on Cygwin
PTHREADSCONF=$(HOSTCC)
PTHREADSCONF=$(HOSTCC)
endif
endif
......@@ -371,8 +371,8 @@ ifeq ($(BUILD),i586-pc-beos)
( cd $< && for f in `find . -name libtool`; do sed -e 's/ -shared / -nostart /' -e 's/^predep_objects.*/predep_objects=""/' -i $$f; chmod +x $$f; done )
endif
ifneq ($(HOST),$(BUILD))
# We'll use the installed gettext and only need to cross-compile libintl
( cd $< && make -C gettext-runtime/intl && make -C gettext-runtime/intl install )
# We'll use the installed gettext and only need to cross-compile libintl, also build autopoint and gettextsize tools need for VLC bootstrap
( cd $< && make -C gettext-runtime/intl && make -C gettext-runtime/intl install && make -C gettext-tools/misc install )
else
# Build and install the whole gettext
( cd $< && make && make install )
......@@ -426,7 +426,11 @@ freetype2: freetype-$(FREETYPE2_VERSION).tar.gz
$(EXTRACT_GZ)
.freetype: freetype2
ifdef HAVE_CYGWIN
(cd $<; CPPFLAGS="$(EXTRA_CPPFLAGS)" CFLAGS="$(EXTRA_CFLAGS)" LDFLAGS="$(EXTRA_LDFLAGS)" -I$(PREFIX)/include" ./configure --target=$(HOST) --disable-pic --disable-shared --prefix=$(PREFIX) && make && make install)
else
(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install)
endif
$(INSTALL_NAME)
touch $@
......@@ -708,7 +712,7 @@ ifneq ($(HOST),$(BUILD))
(patch -p0 < Patches/flac-cross.patch && cd $@ && autoconf)
endif
.FLAC: flac
.flac: flac .ogg
ifdef HAVE_WIN32
(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-oggtest && cd src&& make -C libFLAC&& make -C libFLAC install && cd .. && make -C include install)
else
......
......@@ -461,3 +461,22 @@ diff -ur libdvdnav/src/vm/vm.c libdvdnav.new/src/vm/vm.c
menus_LDADD = $(DVDNAV_LIB)
$(DVDNAV_LIB):
--- libdvdnav/src/dvdnav_internal.h.orig 2007-02-19 18:41:27.784456800 +0000
+++ libdvdnav/src/dvdnav_internal.h 2007-02-19 18:41:50.706478500 +0000
@@ -45,6 +45,7 @@
#define pthread_mutex_unlock(a) LeaveCriticalSection(a)
#define pthread_mutex_destroy(a)
+#if 0
/* replacement gettimeofday implementation */
#include <sys/timeb.h>
static inline int _private_gettimeofday( struct timeval *tv, void *tz )
@@ -56,6 +57,8 @@
return 0;
}
#define gettimeofday(TV, TZ) _private_gettimeofday((TV), (TZ))
+#endif
+
#include <io.h> /* read() */
#define lseek64 _lseeki64
diff -ruN live.old/Makefile.tail live/Makefile.tail
--- live.old/Makefile.tail 2006-11-16 03:09:43.000000000 +0100
+++ live/Makefile.tail 2006-11-16 22:10:06.000000000 +0100
@@ -18,9 +18,7 @@
--- live/Makefile.tail.orig 2006-07-04 06:25:31.000000000 +0100
+++ live/Makefile.tail 2007-02-19 17:18:51.471486600 +0000
@@ -14,8 +14,6 @@
ALL = $(LIVEMEDIA_LIB) \
$(GROUPSOCK_LIB) \
$(USAGE_ENVIRONMENT_LIB) \
- $(USAGE_ENVIRONMENT_LIB) \
- $(BASIC_USAGE_ENVIRONMENT_LIB) \
- $(TESTPROGS_APP) \
- $(MEDIA_SERVER_APP)
- $(TESTPROGS_APP)
+ $(BASIC_USAGE_ENVIRONMENT_LIB)
all: $(ALL)
diff -ruN live.old/config.macosx live/config.macosx
--- live.old/config.macosx 2006-11-16 03:09:43.000000000 +0100
+++ live/config.macosx 2006-11-16 22:09:58.000000000 +0100
@@ -1,4 +1,4 @@
-COMPILE_OPTS = $(INCLUDES) -I. -DBSD=1 -O -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1
+COMPILE_OPTS = $(INCLUDES) -I. EXTRA_CFLAGS -DBSD=1 -O -DSOCKLEN_T=socklen_t -DUSE_LOCALE -DHAVE_SOCKADDR_LEN=1
-COMPILE_OPTS = $(INCLUDES) -I. -DBSD=1 -O -DSOCKLEN_T=socklen_t
+COMPILE_OPTS = $(INCLUDES) -I. $(EXTRA_CFLAGS) -DBSD=1 -O -DSOCKLEN_T=socklen_t
C = c
C_COMPILER = cc
C_FLAGS = $(COMPILE_OPTS)
......@@ -26,7 +24,7 @@ diff -ruN live.old/config.macosx live/config.macosx
OBJ = o
LINK = c++ -o
-LINK_OPTS = -L.
+LINK_OPTS = -L. EXTRA_LDFLAGS
+LINK_OPTS = -L. $(EXTRA_LDFLAGS)
CONSOLE_LINK_OPTS = $(LINK_OPTS)
-LIBRARY_LINK = ld -o
-LIBRARY_LINK_OPTS = $(LINK_OPTS) -r
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment