1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-05 22:43:24 +00:00
freebsd-ports/graphics/mpeg-lib/files/patch-aa
Steve Price b1a5d22260 Update to version 1.3.1.
PR:		13529
Submitted by:	KATO Tsuguru <tkato@prontomail.ne.jp>
1999-09-18 17:55:03 +00:00

75 lines
2.0 KiB
Plaintext

--- Makefile.in.orig Fri Nov 27 01:03:29 1998
+++ Makefile.in Tue Aug 31 23:11:56 1999
@@ -26,6 +26,7 @@
ARFLAGS = -ru
RANLIB = @RANLIB@
+.SUFFIXES: .so
# Source for the library itself -- note that we define LIBSRC and
# LIBOBJ this way (instead of just LIBOBJ=$(LIBSRC:.c=.o) because
@@ -37,12 +38,17 @@
mono.c ordered.c ordered2.c mb_ordered.c
LIBSRC = @libsrc@
LIBOBJ = @libobj@
+SHLIBOBJ = @shlibobj@
# Other files of interest
LIBRARY = libmpeg.a
-SHLIB = libmpeg.so
+.if ${PORTOBJFORMAT} == elf
+SHLIB = libmpeg.so.1
+.else
+SHLIB = libmpeg.so.1.3
+.endif
HEADER = mpeg.h
EXTRAS = @extras@
@@ -53,7 +59,7 @@
# Library/cleanup targets:
-all: lib $(EXTRAS)
+all: lib shlib $(EXTRAS)
lib: $(LIBRARY)
@@ -63,14 +69,18 @@
$(AR) $(ARFLAGS) $(LIBRARY) $(LIBOBJ)
$(RANLIB) $(LIBRARY)
-$(SHLIB): $(LIBOBJ)
- $(CC) -shared -o $(SHLIB) $(LIBOBJ)
-
-install: $(LIBRARY)
- $(INSTALL) -d $(INSTALL_INCLUDE) $(INSTALL_LIBRARY)
- $(INSTALL) -m 0644 $(HEADER) $(INSTALL_INCLUDE)/$(HEADER)
- $(INSTALL) -m 0644 $(LIBRARY) $(INSTALL_LIBRARY)/$(LIBRARY)
- @if test -f $(SHLIB) ; then echo "warning: $(SHLIB) *not* installed (installing shared libraries is too system-specific)" ; fi
+$(SHLIB): $(SHLIBOBJ)
+.if ${PORTOBJFORMAT} == elf
+ $(CC) -shared -Wl,-soname,$(SHLIB) -o $(SHLIB) $(SHLIBOBJ)
+.else
+ $(CC) -shared -o $(SHLIB) $(SHLIBOBJ)
+.endif
+ ln -sf $(SHLIB) `echo $(SHLIB) | sed 's/\.so.*$$/\.so/'`
+
+install:
+ install -c -m 444 ${LIBRARY} ${SHLIB} ${PREFIX}/lib
+ (cd ${PREFIX}/lib; ln -sf $(SHLIB) `echo $(SHLIB) | sed 's/\.so.*$$/\.so/'`)
+ install -c -m 444 mpeg.h ${PREFIX}/include
clean:
rm -f $(LIBRARY) $(EXTRAS) $(LIBOBJ) core
@@ -80,6 +90,8 @@
rm -f config.cache config.log config.status Makefile config.h
cd extras && $(MAKE) distclean
+.c.so:
+ ${CC} ${CFLAGS} $(INCLUDE_DIRS) -fpic -DPIC -c $< -o $@
# Executable targets (mpegtest, easympeg [GL platforms only])