SHARED_LIBS

USE_LIBTOOL

ok jolan@
This commit is contained in:
jakemsr 2006-01-10 02:23:37 +00:00
parent 84f89159c9
commit 6c1031f9a5
6 changed files with 80 additions and 177 deletions

View File

@ -1,10 +1,22 @@
# $OpenBSD: Makefile,v 1.2 2005/02/25 15:22:51 alek Exp $
# $OpenBSD: Makefile,v 1.3 2006/01/10 02:23:37 jakemsr Exp $
COMMENT= "tools to edit/modify/encode video streams"
DISTNAME= mjpegtools-1.6.2
PKGNAME= ${DISTNAME}p0
PKGNAME= ${DISTNAME}p1
CATEGORIES= multimedia
SHARED_LIBS= lavfile 2.2 \
lavfile-1.6 2.2 \
lavjpeg 2.2 \
lavjpeg-1.6 2.2 \
lavplay 2.2 \
lavplay-1.6 2.2 \
mpeg2enc 2.2 \
mpeg2enc-1.6 2.2 \
mpeg2encpp 2.2 \
mpeg2encpp-1.6 2.2 \
mplex2 2.2 \
mplex2-1.6 2.2
HOMEPAGE= http://mjpeg.sourceforge.net/
@ -29,6 +41,7 @@ LIB_DEPENDS= SDL.2:sdl-*-!no_x11:devel/sdl \
SEPARATE_BUILD= concurrent
USE_LIBTOOL= Yes
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS+= ${CONFIGURE_SHARED}
CONFIGURE_ARGS+= --with-x --enable-xfree-ext \

View File

@ -1,90 +1,7 @@
$OpenBSD: patch-configure,v 1.2 2004/08/13 08:09:23 pvalchev Exp $
--- configure.orig Tue Feb 3 15:58:37 2004
+++ configure Fri Aug 13 01:55:01 2004
@@ -3344,7 +3344,10 @@ else
# I'd rather use --version here, but apparently some GNU ld's only accept -v.
case `$LD -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
- lt_cv_prog_gnu_ld=yes
+ case $host_os in
+ openbsd*) lt_cv_prog_gnu_ld=no ;;
+ *) lt_cv_prog_gnu_ld=yes ;;
+ esac
;;
*)
lt_cv_prog_gnu_ld=no
@@ -3574,12 +3577,10 @@ nto-qnx)
;;
openbsd*)
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
else
- lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
fi
;;
@@ -7902,7 +7903,7 @@ openbsd*)
version_type=sunos
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ library_names_spec='${libname}${shared_ext}$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
@@ -10114,6 +10115,19 @@ if test -z "$aix_libpath"; then aix_libp
# Workaround some broken pre-1.5 toolchains
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
;;
+ openbsd*)
+ hardcode_direct_CXX=yes
+ hardcode_shlibpath_var_CXX=no
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${
+wl}-retain-symbols-file,$export_symbols -o $lib'
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+ output_verbose_link_cmd='echo'
+ ;;
osf3*)
case $cc_basename in
KCC)
@@ -11466,7 +11480,7 @@ openbsd*)
version_type=sunos
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ library_names_spec='${libname}${shared_ext}$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
@@ -14492,7 +14506,7 @@ openbsd*)
version_type=sunos
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ library_names_spec='${libname}${shared_ext}$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
@@ -16802,7 +16816,7 @@ openbsd*)
version_type=sunos
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ library_names_spec='${libname}${shared_ext}$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
@@ -22483,10 +22497,10 @@ fi
$OpenBSD: patch-configure,v 1.3 2006/01/10 02:23:37 jakemsr Exp $
--- configure.orig Tue Feb 3 14:58:37 2004
+++ configure Sun Jan 8 15:18:30 2006
@@ -22483,10 +22483,10 @@ fi
# FreeBSD and OpenBSD have neither -lpthread nor integrated pthreads in libc.
# Instead -pthread is used to the compiler/linker to get pthreads working right.
@ -99,7 +16,7 @@ $OpenBSD: patch-configure,v 1.2 2004/08/13 08:09:23 pvalchev Exp $
case "$HOSTTYPE" in
@@ -22965,13 +22979,13 @@ rm -f conftest.$ac_objext conftest$ac_ex
@@ -22965,13 +22965,13 @@ rm -f conftest.$ac_objext conftest$ac_ex
have_pthread=false
@ -116,7 +33,7 @@ $OpenBSD: patch-configure,v 1.2 2004/08/13 08:09:23 pvalchev Exp $
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
/* confdefs.h. */
@@ -23020,7 +23034,7 @@ fi
@@ -23020,7 +23020,7 @@ fi
echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
if test $ac_cv_lib_pthread_pthread_create = yes; then
@ -125,7 +42,7 @@ $OpenBSD: patch-configure,v 1.2 2004/08/13 08:09:23 pvalchev Exp $
cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBPTHREAD 1
@@ -23570,6 +23584,7 @@ if test x$with_dv = x ; then
@@ -23570,6 +23570,7 @@ if test x$with_dv = x ; then
fi
have_dv=false
@ -133,7 +50,7 @@ $OpenBSD: patch-configure,v 1.2 2004/08/13 08:09:23 pvalchev Exp $
EXTRA_LIBS=" $LIBM_LIBS $GLIB_LIBS $PTHREAD_LIBS"
echo "$as_me:$LINENO: checking for dv_decoder_free in -ldv" >&5
echo $ECHO_N "checking for dv_decoder_free in -ldv... $ECHO_C" >&6
@@ -23635,8 +23650,8 @@ _ACEOF
@@ -23635,8 +23636,8 @@ _ACEOF
have_dv=true
fi
@ -143,7 +60,7 @@ $OpenBSD: patch-configure,v 1.2 2004/08/13 08:09:23 pvalchev Exp $
have_dv_yv12=false
if test x$with_dv_yv12 = xyes -a $have_dv = true; then
@@ -25852,7 +25867,7 @@ echo "$as_me:$LINENO: checking x86 sub-a
@@ -25852,7 +25853,7 @@ echo "$as_me:$LINENO: checking x86 sub-a
echo $ECHO_N "checking x86 sub-architecture settings... $ECHO_C" >&6
if test "$enable_cmov_extension" != "no" ; then
@ -152,7 +69,7 @@ $OpenBSD: patch-configure,v 1.2 2004/08/13 08:09:23 pvalchev Exp $
else
arch=i586
fi
@@ -26013,9 +26028,10 @@ else
@@ -26013,9 +26014,10 @@ else
fi

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-lavtools_Makefile_in,v 1.1.1.1 2004/07/09 11:58:39 sturm Exp $
--- lavtools/Makefile.in.orig 2004-02-03 14:58:30.000000000 -0800
+++ lavtools/Makefile.in 2004-05-12 13:12:32.000000000 -0700
$OpenBSD: patch-lavtools_Makefile_in,v 1.2 2006/01/10 02:23:37 jakemsr Exp $
--- lavtools/Makefile.in.orig Tue Feb 3 14:58:30 2004
+++ lavtools/Makefile.in Sun Jan 8 16:35:12 2006
@@ -241,12 +241,12 @@ LAV_ALL_LIB_OPTS = \
@ -16,6 +16,45 @@ $OpenBSD: patch-lavtools_Makefile_in,v 1.1.1.1 2004/07/09 11:58:39 sturm Exp $
liblavrec_la_SOURCES = liblavrec.c audiolib.c frequencies.c
liblavrec_la_LDFLAGS = $(LAV_ALL_LIB_OPTS)
@@ -323,7 +323,7 @@ ypipe_LDADD = $(top_builddir)/utils/libm
yuv2lav_SOURCES = yuv2lav.c
yuv2lav_LDADD = $(top_builddir)/utils/libmjpegutils.a \
- liblavfile.la liblavjpeg.la ${LIBM_LIBS}
+ liblavfile.la $(PTHREAD_LIBS) liblavjpeg.la ${LIBM_LIBS}
transist_flt_SOURCES = transist.flt.c
@@ -371,17 +371,17 @@ yuvmedianfilter_LDADD = $(top_builddir)/
lav2wav_SOURCES = lav2wav.c
lav2wav_LDADD = $(top_builddir)/utils/libmjpegutils.a \
- liblavfile.la
+ liblavfile.la $(PTHREAD_LIBS)
lavtrans_SOURCES = lavtrans.c
lavtrans_LDADD = $(top_builddir)/utils/libmjpegutils.a \
- liblavfile.la
+ liblavfile.la $(PTHREAD_LIBS)
lavaddwav_SOURCES = lavaddwav.c
lavaddwav_LDADD = $(top_builddir)/utils/libmjpegutils.a \
- liblavfile.la
+ liblavfile.la $(PTHREAD_LIBS)
glav_SOURCES = glav.c glav_main.c
@@ -415,7 +415,7 @@ y4mcolorbars_LDADD = $(top_builddir)/uti
lavinfo_SOURCES = lavinfo.c
lavinfo_LDADD = $(top_builddir)/utils/libmjpegutils.a \
- liblavfile.la
+ liblavfile.la $(PTHREAD_LIBS)
y4mshift_SOURCES = y4mshift.c
@@ -1507,7 +1507,7 @@ am_png2yuv_OBJECTS = png2yuv.$(OBJEXT) c
subsample.$(OBJEXT)
png2yuv_OBJECTS = $(am_png2yuv_OBJECTS)

View File

@ -1,62 +0,0 @@
$OpenBSD: patch-ltmain_sh,v 1.2 2004/08/13 08:09:23 pvalchev Exp $
--- ltmain.sh.orig Tue Feb 3 14:58:07 2004
+++ ltmain.sh Fri Aug 13 00:25:53 2004
@@ -1354,6 +1354,17 @@ EOF
-o) prev=output ;;
+ -pthread)
+ case $host in
+ *-*-openbsd* | *-*-freebsd*)
+ # These systems use the -pthread flag for pthreads.
+ deplibs="$deplibs $arg"
+ continue
+ ;;
+ esac
+ continue
+ ;;
+
-release)
prev=release
continue
@@ -1898,6 +1909,22 @@ EOF
esac # linkmode
continue
;; # -L
+ -pthread)
+ case $host in
+ *-*-openbsd* | *-*-freebsd*)
+ # These systems use the -pthread flag for pthreads.
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ ;;
+ esac
+ continue
+ ;;
-R*)
if test "$pass" = link; then
dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
@@ -2403,7 +2430,7 @@ EOF
add_dir=
add=
# Finalize command for both is simple: just hardcode it.
- if test "$hardcode_direct" = yes; then
+ if test "$hardcode_direct" = yes && test -f $libdir/$linklib; then
add="$libdir/$linklib"
elif test "$hardcode_minus_L" = yes; then
add_dir="-L$libdir"
@@ -3337,7 +3364,7 @@ EOF
if test -n "$a_deplib" ; then
libname=`eval \\$echo \"$libname_spec\"`
for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
- potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ potential_libs=`ls $i/$libname[.-]* $i/${libname}_pic.a 2>/dev/null`
for potent_lib in $potential_libs; do
potlib="$potent_lib" # see symlink-check above in file_magic test
if eval $echo \"$potent_lib\" 2>/dev/null \

View File

@ -1,15 +1,6 @@
$OpenBSD: patch-mpeg2enc_Makefile_in,v 1.1.1.1 2004/07/09 11:58:39 sturm Exp $
$OpenBSD: patch-mpeg2enc_Makefile_in,v 1.2 2006/01/10 02:23:37 jakemsr Exp $
--- mpeg2enc/Makefile.in.orig Tue Feb 3 14:58:31 2004
+++ mpeg2enc/Makefile.in Wed Jun 30 15:03:55 2004
@@ -326,7 +326,7 @@ libmpeg2encpp_la_DEPENDENCIES = \
libmpeg2encpp_la_LIBADD = \
- $(top_builddir)/utils/libmjpegutils.a \
+ -L$(top_builddir)/utils -lmjpegutils \
$(top_builddir)/utils/libcpuaccel.la \
$(top_builddir)/utils/libmotion.la \
$(LIBSIMDASM_LIB)
+++ mpeg2enc/Makefile.in Sun Jan 8 16:42:20 2006
@@ -634,7 +634,7 @@ distclean-compile:
$(CCASCOMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`

View File

@ -1,6 +1,11 @@
@comment $OpenBSD: PFRAG.shared,v 1.2 2004/09/15 18:04:35 espie Exp $
@lib lib/liblavfile.so.2.2
@lib lib/liblavjpeg.so.2.2
@lib lib/liblavplay.so.2.2
@lib lib/libmpeg2encpp.so.2.2
@lib lib/libmplex2.so.2.2
@comment $OpenBSD: PFRAG.shared,v 1.3 2006/01/10 02:23:37 jakemsr Exp $
@lib lib/liblavfile-1.6.so.${LIBlavfile-1.6_VERSION}
@lib lib/liblavfile.so.${LIBlavfile_VERSION}
@lib lib/liblavjpeg-1.6.so.${LIBlavjpeg-1.6_VERSION}
@lib lib/liblavjpeg.so.${LIBlavjpeg_VERSION}
@lib lib/liblavplay-1.6.so.${LIBlavplay-1.6_VERSION}
@lib lib/liblavplay.so.${LIBlavplay_VERSION}
@lib lib/libmpeg2encpp-1.6.so.${LIBmpeg2encpp-1.6_VERSION}
@lib lib/libmpeg2encpp.so.${LIBmpeg2encpp_VERSION}
@lib lib/libmplex2-1.6.so.${LIBmplex2-1.6_VERSION}
@lib lib/libmplex2.so.${LIBmplex2_VERSION}