Skip to content

Commit 7023a22

Browse files
committed
vdr-plugin-mp3: fix installation in sysroot
1 parent 42db555 commit 7023a22

2 files changed

Lines changed: 73 additions & 30 deletions

File tree

packages/vdr/_vdr-plugin-mp3/package.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ PKG_BUILD_FLAGS="+speed"
1717
pre_make_target() {
1818
export LDFLAGS="$(echo ${LDFLAGS} | sed -e "s|-Wl,--as-needed||") -L${SYSROOT_PREFIX}/usr/local/lib"
1919
export PKG_CONFIG_DISABLE_SYSROOT_PREPEND="yes"
20-
export VDRDIR=$(get_install_dir _vdr)/usr/local/
20+
export VDRDIR=$(get_install_dir _vdr)/usr/local/lib/pkgconfig
2121
CXXFLAGS="$CXXFLAGS -fPIC"
2222
}
2323

packages/vdr/_vdr-plugin-mp3/patches/Makefile.patch

Lines changed: 72 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
1-
From e4abf7f1ef42c9dd6644a6d8200f10f11085502c Mon Sep 17 00:00:00 2001
2-
From: Andreas Baierl <ichgeh@imkreisrum.de>
3-
Date: Mon, 8 May 2023 10:37:24 +0200
4-
Subject: [PATCH] Makefile
5-
6-
---
7-
Makefile | 144 +++++++++++++++++++++----------------------------------
8-
1 file changed, 55 insertions(+), 89 deletions(-)
9-
10-
diff --git a/Makefile b/Makefile
11-
index f6f4a6d..6f75ccc 100644
12-
--- a/Makefile
13-
+++ b/Makefile
14-
@@ -23,7 +23,7 @@
1+
diff -ru8bBwd a/Makefile b/Makefile
2+
--- a/Makefile 2025-01-03 07:39:58.000000000 +0100
3+
+++ b/Makefile 2025-10-02 00:03:47.932779242 +0200
4+
@@ -18,54 +18,57 @@
5+
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
6+
# Or, point your browser to http://www.gnu.org/copyleft/gpl.html
7+
8+
# You can change the compile options here or create a Make.config
9+
# in the VDR directory an set them there.
1510

1611
### uncomment one of these lines, if you don't want one of the plugins
1712
#WITHOUT_MP3=1
@@ -20,7 +15,14 @@ index f6f4a6d..6f75ccc 100644
2015

2116
### uncomment the following line, if you don't have libsndfile installed
2217
#WITHOUT_LIBSNDFILE=1
23-
@@ -38,7 +38,7 @@
18+
19+
### uncomment the following line, if you don't have libvorbisfile installed
20+
#WITHOUT_LIBVORBISFILE=1
21+
22+
### uncomment the following line, if you want OSS sound output
23+
#WITH_OSS_OUTPUT=1
24+
25+
### uncomment the following line, if you want to include debug symbols
2426
#DBG=1
2527

2628
### The C++ compiler and options:
@@ -29,7 +31,12 @@ index f6f4a6d..6f75ccc 100644
2931
CXXFLAGS ?= -O2 -fPIC -Wall -Woverloaded-virtual
3032

3133
###############################################
32-
@@ -51,16 +51,19 @@ CXXFLAGS ?= -O2 -fPIC -Wall -Woverloaded-virtual
34+
###############################################
35+
#
36+
# no user configurable options below this point
37+
#
38+
###############################################
39+
###############################################
3340

3441
### The directory environment:
3542

@@ -39,7 +46,7 @@ index f6f4a6d..6f75ccc 100644
3946
+# Use package data if installed...otherwise assume we're under the VDR source directory:
4047
+PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc))
4148
+LIBDIR = $(call PKGCFG,libdir)
42-
+LIBDIR = $(call PKGCFG,locdir)
49+
+LOCDIR = $(call PKGCFG,locdir)
4350
+#
4451
+TMPDIR ?= /tmp
4552
+VDRDIR ?= ../../..
@@ -53,7 +60,37 @@ index f6f4a6d..6f75ccc 100644
5360

5461
### Allow user defined options to overwrite defaults:
5562

56-
@@ -96,6 +99,8 @@ endif
63+
-include $(VDRDIR)/Make.config
64+
-include Make.config
65+
66+
### The version number of this plugin:
67+
68+
@@ -75,32 +78,34 @@
69+
echo -n "-"; (hg identify 2>/dev/null || echo -n "Unknown") | sed -e 's/ .*//'; \
70+
elif test -r $(HGARCHIVE); then \
71+
echo -n "-"; grep "^node" $(HGARCHIVE) | awk '{ printf "%.12s",$$2 }'; \
72+
fi)
73+
VERSION := $(RELEASE)$(RELSTR)
74+
75+
### The version number of VDR (taken from VDR's "config.h"):
76+
77+
-VDRVERSION := $(shell sed -ne '/define VDRVERSION/ s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/include/vdr/config.h)
78+
-APIVERSION := $(shell sed -ne '/define APIVERSION/ s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/include/vdr/config.h)
79+
+VDRVERSION := $(shell sed -ne '/define VDRVERSION/ s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/../../include/vdr/config.h)
80+
+APIVERSION := $(shell sed -ne '/define APIVERSION/ s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/../../include/vdr/config.h)
81+
ifeq ($(strip $(APIVERSION)),)
82+
APIVERSION = $(VDRVERSION)
83+
endif
84+
-VDRVERSNUM := $(shell sed -ne '/define VDRVERSNUM/ s/^.[a-zA-Z ]*\([0-9]*\) .*$$/\1/p' $(VDRDIR)/include/vdr/config.h)
85+
-APIVERSNUM := $(shell sed -ne '/define APIVERSNUM/ s/^.[a-zA-Z ]*\([0-9]*\) .*$$/\1/p' $(VDRDIR)/include/vdr/config.h)
86+
+VDRVERSNUM := $(shell sed -ne '/define VDRVERSNUM/ s/^.[a-zA-Z ]*\([0-9]*\) .*$$/\1/p' $(VDRDIR)/../../include/vdr/config.h)
87+
+APIVERSNUM := $(shell sed -ne '/define APIVERSNUM/ s/^.[a-zA-Z ]*\([0-9]*\) .*$$/\1/p' $(VDRDIR)/../../include/vdr/config.h)
88+
ifeq ($(strip $(APIVERSNUM)),)
89+
APIVERSNUM = $(VDRVERSNUM)
90+
endif
91+
92+
### The name of the distribution archive:
93+
5794
ARCHIVE = $(PLUGIN)-$(RELEASE)
5895
PACKAGE = vdr-$(ARCHIVE)
5996

@@ -62,7 +99,17 @@ index f6f4a6d..6f75ccc 100644
6299
### Includes and Defines (add further entries here):
63100

64101
INCLUDES += -I$(VDRDIR)/include
65-
@@ -126,123 +131,84 @@ ifdef BROKEN_PCM
102+
DEFINES += -D_GNU_SOURCE -DAPIVERSNUM=$(APIVERSNUM)
103+
104+
### The object files (add further files here):
105+
106+
COM_OBJS = data.o menu.o version.o
107+
@@ -121,128 +126,89 @@
108+
endif
109+
ifdef WITH_OSS_OUTPUT
110+
DEFINES += -DWITH_OSS
111+
endif
112+
ifdef BROKEN_PCM
66113
DEFINES += -DBROKEN_PCM
67114
endif
68115

@@ -75,13 +122,11 @@ index f6f4a6d..6f75ccc 100644
75122
endif
76123

77124
-ifneq ($(shell if test $(APIVERSNUM) -ge 010703; then echo "*"; fi),)
78-
- DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
125+
DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
79126
-endif
80-
+DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
81127

82128
-### Internationalization (I18N):
83-
+### The main target:
84-
129+
-
85130
-PODIR = po
86131
-I18Npot = $(PODIR)/mp3-mplayer.pot
87132
-I18Npots := $(notdir $(foreach file, $(wildcard $(PODIR)/*.po), $(basename $(file))))
@@ -95,16 +140,17 @@ index f6f4a6d..6f75ccc 100644
95140
-LOCALEDIR = $(VDRDIR)/locale
96141
-I18Nmsgs := $(addprefix $(LOCALEDIR)/,$(addsuffix /LC_MESSAGES/$(I18Nmo),$(I18Npots)))
97142
-I18Nmsgs2 := $(addprefix $(LOCALEDIR)/,$(addsuffix /LC_MESSAGES/$(I18Nmo2),$(I18Npots)))
98-
+all: $(SOFILE) i18n
143+
+### The main target:
99144

100145
-HASLOCALE = $(shell grep -l 'I18N_DEFAULT_LOCALE' $(VDRDIR)/include/vdr/i18n.h)
101146
-ifeq ($(strip $(HASLOCALE)),)
102147
- COM_OBJS += i18n.o
103148
-endif
104-
+### Implicit rules:
149+
+all: $(SOFILE) i18n
105150

106151
-### Targets:
107-
-
152+
+### Implicit rules:
153+
108154
-ifndef WITHOUT_MP3
109155
- ALL += libvdr-$(PLUGIN).so
110156
- ifneq ($(strip $(HASLOCALE)),)
@@ -230,6 +276,3 @@ index f6f4a6d..6f75ccc 100644
230276
+ @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~
231277

232278
FORCE:
233-
--
234-
2.30.2
235-

0 commit comments

Comments
 (0)