summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gentoo.org>2019-07-08 19:35:26 -0600
committerTim Harder <radhermit@gentoo.org>2019-07-08 20:39:45 -0600
commit3a186e5e0752b5f67cb174bfa3efe81c4c95cf62 (patch)
tree18e691b4087477e578a36433052fa63883b00635 /media-libs/libdvd-audio/files
parentnet-analyzer/netdata: 1.16.0 version bump (diff)
downloadgentoo-3a186e5e0752b5f67cb174bfa3efe81c4c95cf62.tar.gz
gentoo-3a186e5e0752b5f67cb174bfa3efe81c4c95cf62.tar.bz2
gentoo-3a186e5e0752b5f67cb174bfa3efe81c4c95cf62.zip
media-libs/libdvd-audio: initial import
Signed-off-by: Tim Harder <radhermit@gentoo.org>
Diffstat (limited to 'media-libs/libdvd-audio/files')
-rw-r--r--media-libs/libdvd-audio/files/libdvd-audio-1.0.0-makefile.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/media-libs/libdvd-audio/files/libdvd-audio-1.0.0-makefile.patch b/media-libs/libdvd-audio/files/libdvd-audio-1.0.0-makefile.patch
new file mode 100644
index 000000000000..fd9308b69c80
--- /dev/null
+++ b/media-libs/libdvd-audio/files/libdvd-audio-1.0.0-makefile.patch
@@ -0,0 +1,53 @@
+Respect CFLAGS/LDFLAGS and use DESTDIR for install targets.
+
+--- libdvd-audio-1.0.0/Makefile
++++ libdvd-audio-1.0.0/Makefile
+@@ -1,8 +1,9 @@
+-FLAGS = -Wall -O2 -g -fPIC
+-LIB_DIR = /usr/local/lib
+-INCLUDE_DIR = /usr/local/include
+-BIN_DIR = /usr/local/bin
+-PKG_CONFIG_DIR = /usr/lib/pkgconfig
++FLAGS = -Wall -fPIC $(CFLAGS)
++PREFIX = /usr/local
++LIB_DIR = $(PREFIX)/lib
++INCLUDE_DIR = $(PREFIX)/include
++BIN_DIR = $(PREFIX)/bin
++PKG_CONFIG_DIR = $(LIB_DIR)/pkgconfig
+
+ BITSTREAM_OBJS = bitstream.o \
+ huffman.o \
+@@ -56,13 +57,17 @@
+ all: $(STATIC_LIBRARY) $(SHARED_LIBRARIES) $(BINARIES) $(PKG_CONFIG_METADATA)
+
+ install: $(STATIC_LIBRARY) $(SHARED_LIBRARIES) $(BINARIES) $(PKG_CONFIG_METADATA)
+- install -m 644 $(SHARED_LIBRARY) $(LIB_DIR)
+- cp -Pp $(SHARED_LIBRARY_LINK_1) $(LIB_DIR)
+- cp -Pp $(SHARED_LIBRARY_LINK_2) $(LIB_DIR)
+- install -m 644 $(STATIC_LIBRARY) $(LIB_DIR)
+- install -m 644 include/dvd-audio.h $(INCLUDE_DIR)
+- install -m 755 $(BINARIES) $(BIN_DIR)
+- install -m 644 $(PKG_CONFIG_METADATA) $(PKG_CONFIG_DIR)
++ mkdir -p $(DESTDIR)$(LIB_DIR)
++ install -m 755 $(SHARED_LIBRARY) $(DESTDIR)$(LIB_DIR)
++ cp -Pp $(SHARED_LIBRARY_LINK_1) $(DESTDIR)$(LIB_DIR)
++ cp -Pp $(SHARED_LIBRARY_LINK_2) $(DESTDIR)$(LIB_DIR)
++ install -m 644 $(STATIC_LIBRARY) $(DESTDIR)$(LIB_DIR)
++ mkdir -p $(DESTDIR)$(INCLUDE_DIR)
++ install -m 644 include/dvd-audio.h $(DESTDIR)$(INCLUDE_DIR)
++ mkdir -p $(DESTDIR)$(BIN_DIR)
++ install -m 755 $(BINARIES) $(DESTDIR)$(BIN_DIR)
++ mkdir -p $(DESTDIR)$(PKG_CONFIG_DIR)
++ install -m 644 $(PKG_CONFIG_METADATA) $(DESTDIR)$(PKG_CONFIG_DIR)
+
+ clean:
+ rm -f $(BINARIES) $(CODEBOOKS) $(BINARIES) $(PKG_CONFIG_METADATA) huffman *.o *.a *.so*
+@@ -71,7 +76,7 @@
+ $(AR) -r $@ $(DVDA_OBJS)
+
+ $(SHARED_LIBRARY): $(DVDA_OBJS)
+- $(CC) $(FLAGS) -Wl,-soname,libdvd-audio.so.$(MAJOR_VERSION) -shared -o $@ $(DVDA_OBJS)
++ $(CC) $(FLAGS) $(LDFLAGS) -Wl,-soname,libdvd-audio.so.$(MAJOR_VERSION) -shared -o $@ $(DVDA_OBJS)
+
+ $(SHARED_LIBRARY_LINK_1): $(SHARED_LIBRARY)
+ ln -sf $< $@