XviD: Add libxvidcore.dylib symlink; other cleanup

Install libxvidcore.dylib symlink so that linking with -lxvidcore will
link with the dynamic library not the static library.

Use the two-level namespace instead of the flat namespace.

Fix a typo in configure script output: dynlib -> dylib

See: https://trac.macports.org/ticket/69855
This commit is contained in:
Ryan Carsten Schmidt
2024-04-29 03:16:41 -05:00
parent f5e25c6ae8
commit 1af73fa7b6
6 changed files with 45 additions and 4 deletions
+6 -3
View File
@@ -7,7 +7,7 @@ PortGroup muniversal 1.0
name XviD
version 1.3.7
revision 0
revision 1
categories multimedia devel
platforms darwin sunos
maintainers nomaintainer
@@ -34,8 +34,11 @@ checksums rmd160 84d37c2b3b48fb6cde2b6a6a57c7e6c1bdf79556 \
worksrcdir xvidcore/build/generic
patchfiles patch-Makefile.diff \
patch-CFLAGS.diff
patchfiles configure-CFLAGS.patch \
configure-dynlib.patch \
configure-flat_namespace.patch \
configure-SO_LINK.patch \
Makefile-verbose.patch
use_autoreconf yes
@@ -1,3 +1,4 @@
Let V=1 disable silent rules.
--- Makefile.orig 2014-04-08 13:41:05.000000000 -0700
+++ Makefile 2014-06-13 07:44:45.000000000 -0700
@@ -45,6 +45,12 @@
@@ -1,3 +1,4 @@
Append default CFLAGS to the ones MacPorts sets; increases performance.
--- configure.in.orig 2014-04-08 13:41:05.000000000 -0700
+++ configure.in 2014-06-13 07:49:59.000000000 -0700
@@ -119,7 +119,7 @@
@@ -5,7 +6,7 @@
dnl
AC_MSG_CHECKING(whether to use default CFLAGS)
-if test x"$CFLAGS" = x"" ; then
+if test x"" = x"" ; then
+if true; then
force_default_cc_options="yes"
AC_MSG_RESULT([yes])
else
@@ -0,0 +1,11 @@
Install the libxvidcore.dylib symlink.
--- configure.in.orig 2019-12-28 08:19:24.000000000 -0600
+++ configure.in 2024-04-29 02:28:42.000000000 -0500
@@ -329,6 +329,7 @@
;;
darwin*)
STATIC_LIB="libxvidcore.\$(STATIC_EXTENSION)"
+ SO_LINK="libxvidcore.\$(SHARED_EXTENSION)"
SPECIFIC_CFLAGS="-fPIC -fno-common -no-cpp-precomp"
if test x"$macosx_module" = x"no"; then
AC_MSG_RESULT([dylib options])
@@ -0,0 +1,12 @@
Fix typo in configure output: dynlib -> dylib
--- configure.in.orig 2019-12-28 08:19:24.000000000 -0600
+++ configure.in 2024-04-29 02:28:42.000000000 -0500
@@ -266,7 +266,7 @@
AC_MSG_RESULT([.so .a .o])
SHARED_EXTENSION="so"
else
- AC_MSG_RESULT([.dynlib .a .o])
+ AC_MSG_RESULT([.dylib .a .o])
SHARED_EXTENSION="dylib"
fi
STATIC_EXTENSION="a"
@@ -0,0 +1,13 @@
Do not use the ancient flat namespace. Use the two-level namespace which has
been the default since Mac OS X 10.1.
--- configure.in.orig 2019-12-28 08:19:24.000000000 -0600
+++ configure.in 2024-04-29 02:28:42.000000000 -0500
@@ -333,7 +333,7 @@
if test x"$macosx_module" = x"no"; then
AC_MSG_RESULT([dylib options])
SHARED_LIB="libxvidcore.\$(API_MAJOR).\$(SHARED_EXTENSION)"
- SPECIFIC_LDFLAGS="-Wl,-read_only_relocs,suppress -dynamiclib -flat_namespace -compatibility_version \$(API_MAJOR) -current_version \$(API_MAJOR).\$(API_MINOR) -install_name \$(libdir)/\$(SHARED_LIB)"
+ SPECIFIC_LDFLAGS="-Wl,-read_only_relocs,suppress -dynamiclib -compatibility_version \$(API_MAJOR) -current_version \$(API_MAJOR).\$(API_MINOR) -install_name \$(libdir)/\$(SHARED_LIB)"
else
AC_MSG_RESULT([module options])
PRE_SHARED_LIB="libxvidcore.\$(SHARED_EXTENSION)-temp.o"