Browse Source

Merge pull request #145 from thess/sox-update

Import missing libs for sox and others
lilik-openwrt-22.03
Ted Hess 11 years ago
parent
commit
911bc46f3a
6 changed files with 805 additions and 0 deletions
  1. +94
    -0
      libs/file/Makefile
  2. +98
    -0
      libs/gsm/Makefile
  3. +428
    -0
      libs/gsm/patches/001-debian-libsgm-1.0.10-13.patch
  4. +67
    -0
      libs/libao/Makefile
  5. +85
    -0
      sound/lame/Makefile
  6. +33
    -0
      sound/lame/patches/001-automake-compat.patch

+ 94
- 0
libs/file/Makefile View File

@ -0,0 +1,94 @@
#
# Copyright (C) 2007-2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=file
PKG_VERSION:=5.11
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=ftp://ftp.astron.com/pub/file/
PKG_MD5SUM:=16a407bd66d6c7a832f3a5c0d609c27b
PKG_LICENSE:=BSD-2c
PKG_LICENSE_FILES:=COPYING
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/file/Default
TITLE:=File type determination
URL:=ftp://ftp.astron.com/pub/file/
MAINTAINER:=Luka Perkov <openwrt@lukaperkov.net>
endef
define Package/file
$(call package/file/Default)
SECTION:=utils
CATEGORY:=Utilities
TITLE+= utility
DEPENDS:=+libmagic
endef
define Package/libmagic
$(call package/file/Default)
SECTION:=libs
CATEGORY:=Libraries
TITLE+= library
DEPENDS:=+zlib
endef
CONFIGURE_ARGS += \
--enable-shared \
--enable-static \
MAKE_PATH := src
TARGET_CFLAGS += $(FPIC)
define Build/Compile/magic
( cd $(PKG_BUILD_DIR)/magic/Magdir; \
for f in `ls`; do \
cat $$$${f}; \
done \
) > $(PKG_BUILD_DIR)/magic/magic
endef
Hooks/Compile/Post += Build/Compile/magic
define Build/Install/magic
$(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/share/file
$(INSTALL_DATA) $(PKG_BUILD_DIR)/magic/magic $(PKG_INSTALL_DIR)/usr/share/file/
endef
Hooks/Install/Post += Build/Install/magic
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/magic.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libmagic.{a,so*} $(1)/usr/lib/
endef
define Package/file/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/file $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/share/misc
$(SED) "/^#/d" $(PKG_INSTALL_DIR)/usr/share/file/magic
$(SED) "/^$$$$/d" $(PKG_INSTALL_DIR)/usr/share/file/magic
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/file/magic $(1)/usr/share/misc/
endef
define Package/libmagic/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libmagic.so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,file))
$(eval $(call BuildPackage,libmagic))

+ 98
- 0
libs/gsm/Makefile View File

@ -0,0 +1,98 @@
#
# Copyright (C) 2006-2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=gsm
PKG_VERSION:=1.0.13
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://user.cs.tu-berlin.de/~jutta/gsm/
PKG_MD5SUM:=c1ba392ce61dc4aff1c29ea4e92f6df4
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=FREE
PKG_LICENSE_FILES:=COPYRIGHT
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-1.0-pl13
include $(INCLUDE_DIR)/package.mk
define Package/gsm/Default
TITLE:=GSM transcoding
URL:=http://user.cs.tu-berlin.de/~jutta/toast.html
endef
define Package/gsm/description/Default
An implementation of the European GSM 06.10 provisional standard
for full-rate speech transcoding, prI-ETS 300 036, which uses
RPE/LTP (residual pulse excitation/long term prediction) coding
at 13 kbit/s.
endef
define Package/libgsm
$(call Package/gsm/Default)
SECTION:=libs
CATEGORY:=Libraries
TITLE+= library
endef
define Package/libgsm/description
$(call Package/gsm/description/Default)
This package contains a shared GSM transcoding library, used by other
programs.
endef
define Package/gsm-utils
$(call Package/gsm/Default)
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=+libgsm
TITLE+= utilities
endef
define Package/gsm-utils/description
$(call Package/gsm/description/Default)
This package contains GSM transcoding utilities.
endef
define Build/Configure
endef
TARGET_CFLAGS += $(FPIC)
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
$(TARGET_CONFIGURE_OPTS) \
LD="$(TARGET_CC)" \
COPTS="$(TARGET_CFLAGS)" \
INSTALL_ROOT="$(PKG_INSTALL_DIR)" \
all install
endef
define Package/libgsm/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgsm.so.* $(1)/usr/lib/
endef
define Package/gsm-utils/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/toast $(1)/usr/bin/
(cd $(1)/usr/bin; ln -sf toast untoast; ln -sf toast tcat)
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/gsm
$(CP) $(PKG_INSTALL_DIR)/usr/include/gsm.h $(1)/usr/include/gsm/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgsm.{a,so*} $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libgsm))
$(eval $(call BuildPackage,gsm-utils))

+ 428
- 0
libs/gsm/patches/001-debian-libsgm-1.0.10-13.patch View File

@ -0,0 +1,428 @@
--- a/Makefile
+++ b/Makefile
@@ -8,10 +8,12 @@ SASR = -DSASR
######### Define SASR if >> is a signed arithmetic shift (-1 >> 1 == -1)
# MULHACK = -DUSE_FLOAT_MUL
+MULHACK =
######### Define this if your host multiplies floats faster than integers,
######### e.g. on a SPARCstation.
# FAST = -DFAST
+FAST =
######### Define together with USE_FLOAT_MUL to enable the GSM library's
######### approximation option for incorrect, but good-enough results.
@@ -22,8 +24,8 @@ LTP_CUT =
######### both integer and floating point multiplications.
######### This flag is still in the experimental stage.
-WAV49 = -DWAV49
-# WAV49 =
+# WAV49 = -DWAV49
+WAV49 =
######### Define to enable the GSM library's option to pack GSM frames
######### in the style used by the WAV #49 format. If you want to write
######### a tool that produces .WAV files which contain GSM-encoded data,
@@ -44,7 +46,8 @@ WAV49 = -DWAV49
# CCFLAGS = -c -O
CC = gcc -ansi -pedantic
-CCFLAGS = -c -O2 -DNeedFunctionPrototypes=1
+COPTS = -O2
+CCFLAGS = -c $(COPTS) -DNeedFunctionPrototypes=1
LD = $(CC)
@@ -78,10 +81,10 @@ INSTALL_ROOT =
# Leave GSM_INSTALL_ROOT empty to not install the GSM library outside of
# this directory.
-GSM_INSTALL_ROOT = $(INSTALL_ROOT)
+GSM_INSTALL_ROOT = $(INSTALL_ROOT)/usr
GSM_INSTALL_LIB = $(GSM_INSTALL_ROOT)/lib
-GSM_INSTALL_INC = $(GSM_INSTALL_ROOT)/inc
-GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/man/man3
+GSM_INSTALL_INC = $(GSM_INSTALL_ROOT)/include
+GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/share/man/man3
# Where do you want to install the toast binaries and their manpage?
@@ -89,14 +92,14 @@ GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/ma
# Leave TOAST_INSTALL_ROOT empty to not install the toast binaries outside
# of this directory.
-TOAST_INSTALL_ROOT = $(INSTALL_ROOT)
+TOAST_INSTALL_ROOT = $(INSTALL_ROOT)/usr
TOAST_INSTALL_BIN = $(TOAST_INSTALL_ROOT)/bin
-TOAST_INSTALL_MAN = $(TOAST_INSTALL_ROOT)/man/man1
+TOAST_INSTALL_MAN = $(TOAST_INSTALL_ROOT)/share/man/man1
# Other tools
SHELL = /bin/sh
-LN = ln
+LN = ln -s
BASENAME = basename
AR = ar
ARFLAGS = cr
@@ -126,7 +129,7 @@ INC = $(ROOT)/inc
# Flags
-# DEBUG = -DNDEBUG
+DEBUG = -DNDEBUG
######### Remove -DNDEBUG to enable assertions.
CFLAGS = $(CCFLAGS) $(SASR) $(DEBUG) $(MULHACK) $(FAST) $(LTP_CUT) \
@@ -140,6 +143,7 @@ LFLAGS = $(LDFLAGS) $(LDINC)
# Targets
LIBGSM = $(LIB)/libgsm.a
+LIBGSMSO= $(LIB)/libgsm.so
TOAST = $(BIN)/toast
UNTOAST = $(BIN)/untoast
@@ -258,6 +262,9 @@ STUFF = ChangeLog \
GSM_INSTALL_TARGETS = \
$(GSM_INSTALL_LIB)/libgsm.a \
+ $(GSM_INSTALL_LIB)/libgsm.so \
+ $(GSM_INSTALL_LIB)/libgsm.so.1 \
+ $(GSM_INSTALL_LIB)/libgsm.so.1.0.10 \
$(GSM_INSTALL_INC)/gsm.h \
$(GSM_INSTALL_MAN)/gsm.3 \
$(GSM_INSTALL_MAN)/gsm_explode.3 \
@@ -279,7 +286,7 @@ TOAST_INSTALL_TARGETS = \
# Target rules
-all: $(LIBGSM) $(TOAST) $(TCAT) $(UNTOAST)
+all: $(LIBGSM) $(LIBGSMSO) $(TOAST) $(TCAT) $(UNTOAST)
@-echo $(ROOT): Done.
tst: $(TST)/lin2cod $(TST)/cod2lin $(TOAST) $(TST)/test-result
@@ -299,6 +306,11 @@ install: toastinstall gsminstall
# The basic API: libgsm
+$(LIBGSMSO): $(LIB) $(GSM_OBJECTS)
+ $(LD) -o $@.1.0.10 -shared -Xlinker -soname -Xlinker libgsm.so.1 $(GSM_OBJECTS) -lc
+ ln -fs libgsm.so.1.0.10 lib/libgsm.so.1
+ ln -fs libgsm.so.1.0.10 lib/libgsm.so
+
$(LIBGSM): $(LIB) $(GSM_OBJECTS)
-rm $(RMFLAGS) $(LIBGSM)
$(AR) $(ARFLAGS) $(LIBGSM) $(GSM_OBJECTS)
@@ -308,15 +320,15 @@ $(LIBGSM): $(LIB) $(GSM_OBJECTS)
# Toast, Untoast and Tcat -- the compress-like frontends to gsm.
$(TOAST): $(BIN) $(TOAST_OBJECTS) $(LIBGSM)
- $(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) $(LIBGSM) $(LDLIB)
+ $(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) $(LIBGSMSO) $(LDLIB)
$(UNTOAST): $(BIN) $(TOAST)
-rm $(RMFLAGS) $(UNTOAST)
- $(LN) $(TOAST) $(UNTOAST)
+ $(LN) toast $(UNTOAST)
$(TCAT): $(BIN) $(TOAST)
-rm $(RMFLAGS) $(TCAT)
- $(LN) $(TOAST) $(TCAT)
+ $(LN) toast $(TCAT)
# The local bin and lib directories
@@ -351,53 +363,66 @@ toastuninstall:
fi
$(TOAST_INSTALL_BIN)/toast: $(TOAST)
- -rm $@
- cp $(TOAST) $@
+ mkdir -p $(TOAST_INSTALL_BIN)
+ cp -f $(TOAST) $@
chmod 755 $@
$(TOAST_INSTALL_BIN)/untoast: $(TOAST_INSTALL_BIN)/toast
- -rm $@
- ln $? $@
+ mkdir -p $(TOAST_INSTALL_BIN)
+ ln -sf $? $@
$(TOAST_INSTALL_BIN)/tcat: $(TOAST_INSTALL_BIN)/toast
- -rm $@
- ln $? $@
+ mkdir -p $(TOAST_INSTALL_BIN)
+ ln -sf $? $@
$(TOAST_INSTALL_MAN)/toast.1: $(MAN)/toast.1
- -rm $@
- cp $? $@
+ mkdir -p $(TOAST_INSTALL_MAN)
+ cp -f $? $@
chmod 444 $@
$(GSM_INSTALL_MAN)/gsm.3: $(MAN)/gsm.3
- -rm $@
- cp $? $@
+ mkdir -p $(GSM_INSTALL_MAN)
+ cp -f $? $@
chmod 444 $@
$(GSM_INSTALL_MAN)/gsm_option.3: $(MAN)/gsm_option.3
- -rm $@
- cp $? $@
+ mkdir -p $(GSM_INSTALL_MAN)
+ cp -f $? $@
chmod 444 $@
$(GSM_INSTALL_MAN)/gsm_explode.3: $(MAN)/gsm_explode.3
- -rm $@
- cp $? $@
+ mkdir -p $(GSM_INSTALL_MAN)
+ cp -f $? $@
chmod 444 $@
$(GSM_INSTALL_MAN)/gsm_print.3: $(MAN)/gsm_print.3
- -rm $@
- cp $? $@
+ mkdir -p $(GSM_INSTALL_MAN)
+ cp -f $? $@
chmod 444 $@
$(GSM_INSTALL_INC)/gsm.h: $(INC)/gsm.h
- -rm $@
- cp $? $@
+ mkdir -p $(GSM_INSTALL_INC)
+ cp -f $? $@
chmod 444 $@
$(GSM_INSTALL_LIB)/libgsm.a: $(LIBGSM)
- -rm $@
- cp $? $@
+ mkdir -p $(GSM_INSTALL_LIB)
+ cp -f $? $@
chmod 444 $@
+$(GSM_INSTALL_LIB)/libgsm.so: $(LIBGSMSO)
+ mkdir -p $(GSM_INSTALL_LIB)
+ cp -f $? $@
+
+$(GSM_INSTALL_LIB)/libgsm.so.1: $(LIBGSMSO)
+ mkdir -p $(GSM_INSTALL_LIB)
+ cp -f $? $@
+
+$(GSM_INSTALL_LIB)/libgsm.so.1.0.10: $(LIBGSMSO)
+ mkdir -p $(GSM_INSTALL_LIB)
+ cp -f $? $@
+ chmod 755 $@
+
# Distribution
@@ -426,7 +451,9 @@ semi-clean:
clean: semi-clean
-rm $(RMFLAGS) $(LIBGSM) $(ADDTST)/add \
- $(TOAST) $(TCAT) $(UNTOAST) \
+ $(LIBGSMSO) $(LIB)/libgsm.so.1.0.10 \
+ $(LIB)libgsm.so.1 \
+ $(TOAST) $(TCAT) $(UNTOAST) \
$(ROOT)/gsm-1.0.tar.Z
--- a/inc/config.h
+++ b/inc/config.h
@@ -9,8 +9,8 @@
#ifndef CONFIG_H
#define CONFIG_H
-/*efine SIGHANDLER_T int /* signal handlers are void */
-/*efine HAS_SYSV_SIGNAL 1 /* sigs not blocked/reset? */
+/*efine SIGHANDLER_T int *//* signal handlers are void */
+/*efine HAS_SYSV_SIGNAL 1 *//* sigs not blocked/reset? */
#define HAS_STDLIB_H 1 /* /usr/include/stdlib.h */
#define HAS_LIMITS_H 1 /* /usr/include/limits.h */
@@ -22,16 +22,16 @@
#define HAS_CHMOD 1 /* chmod syscall */
#define HAS_FCHOWN 1 /* fchown syscall */
#define HAS_CHOWN 1 /* chown syscall */
-/*efine HAS__FSETMODE 1 /* _fsetmode -- set file mode */
+/*efine HAS__FSETMODE 1 *//* _fsetmode -- set file mode */
#define HAS_STRING_H 1 /* /usr/include/string.h */
-/*efine HAS_STRINGS_H 1 /* /usr/include/strings.h */
+/*efine HAS_STRINGS_H 1 *//* /usr/include/strings.h */
#define HAS_UNISTD_H 1 /* /usr/include/unistd.h */
#define HAS_UTIME 1 /* POSIX utime(path, times) */
-/*efine HAS_UTIMES 1 /* use utimes() syscall instead */
+/*efine HAS_UTIMES 1 *//* use utimes() syscall instead */
#define HAS_UTIME_H 1 /* UTIME header file */
#define HAS_UTIMBUF 1 /* struct utimbuf */
-/*efine HAS_UTIMEUSEC 1 /* microseconds in utimbuf? */
+/*efine HAS_UTIMEUSEC 1 *//* microseconds in utimbuf? */
#endif /* CONFIG_H */
--- a/inc/gsm.h
+++ b/inc/gsm.h
@@ -54,6 +54,10 @@ typedef gsm_byte gsm_frame[33]; /* 33
#define GSM_OPT_FRAME_INDEX 5
#define GSM_OPT_FRAME_CHAIN 6
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern gsm gsm_create GSM_P((void));
extern void gsm_destroy GSM_P((gsm));
@@ -66,6 +70,10 @@ extern int gsm_decode GSM_P((gsm, gsm_
extern int gsm_explode GSM_P((gsm, gsm_byte *, gsm_signal *));
extern void gsm_implode GSM_P((gsm, gsm_signal *, gsm_byte *));
+#ifdef __cplusplus
+}
+#endif
+
#undef GSM_P
#endif /* GSM_H */
--- a/inc/toast.h
+++ b/inc/toast.h
@@ -16,11 +16,12 @@
#include <stdio.h>
#include <ctype.h>
+#include <pthread.h>
#include <signal.h>
#include <errno.h>
-#ifndef HAS_ERRNO_DECL
- extern int errno;
+#ifndef errno
+ extern int errno;
#endif
#ifdef HAS_LIMITS_H
@@ -37,6 +38,10 @@
# endif
#endif
+#ifdef HAS_STDIO_H
+# include <stdio.h>
+#endif
+
#include "gsm.h"
#ifndef S_ISREG
--- a/src/code.c
+++ b/src/code.c
@@ -9,8 +9,8 @@
#include "config.h"
-#ifdef HAS_STDLIB_H
-#include <stdlib.h>
+#ifdef HAS_STRING_H
+#include <string.h>
#else
# include "proto.h"
extern char * memcpy P((char *, char *, int));
--- a/src/debug.c
+++ b/src/debug.c
@@ -49,7 +49,7 @@ void gsm_debug_longwords P4( (name, from
fprintf( stderr, "%s [%d .. %d]: ", name, from, to );
while (from <= to) {
- fprintf(stderr, "%d ", ptr[ from ] );
+ fprintf(stderr, "%ld ", ptr[ from ] );
from++;
if (nprinted++ >= 7) {
nprinted = 0;
@@ -63,14 +63,14 @@ void gsm_debug_longword P2( (name, valu
char * name,
longword value )
{
- fprintf(stderr, "%s: %d\n", name, (long)value );
+ fprintf(stderr, "%s: %ld\n", name, (long)value );
}
void gsm_debug_word P2( (name, value),
char * name,
word value )
{
- fprintf(stderr, "%s: %d\n", name, (long)value);
+ fprintf(stderr, "%s: %ld\n", name, (long)value);
}
#endif
--- a/src/toast.c
+++ b/src/toast.c
@@ -251,8 +251,8 @@ static char * emalloc P1((len), size_t l
{
char * s;
if (!(s = malloc(len))) {
- fprintf(stderr, "%s: failed to malloc %d bytes -- abort\n",
- progname, len);
+ fprintf(stderr, "%s: failed to malloc %ld bytes -- abort\n",
+ progname, (long) len);
onintr();
exit(1);
}
@@ -270,7 +270,7 @@ static char* normalname P3((name, want,
maxlen = strlen(name) + 1 + strlen(want) + strlen(cut);
p = strcpy(emalloc(maxlen), name);
- if (s = suffix(p, cut)) strcpy(s, want);
+ if ((s = suffix(p, cut))) strcpy(s, want);
else if (*want && !suffix(p, want)) strcat(p, want);
return p;
@@ -386,7 +386,7 @@ static void update_times P0()
ut[0] = instat.st_atime;
ut[1] = instat.st_mtime;
- (void) utime(outname, ut);
+ (void) utime(outname, (struct utimbuf *)ut);
#endif /* UTIMBUF */
}
@@ -416,7 +416,7 @@ static int okay_as_input P3((name,f,st),
}
if (st->st_nlink > 1 && !f_cat && !f_precious) {
fprintf(stderr,
- "%s: \"%s\" has %s other link%s -- unchanged.\n",
+ "%s: \"%s\" has %d other link%s -- unchanged.\n",
progname,name,st->st_nlink - 1,"s" + (st->st_nlink<=2));
return 0;
}
@@ -585,8 +585,8 @@ static int process_decode P0()
if (cc != sizeof(s)) {
if (cc >= 0) fprintf(stderr,
- "%s: incomplete frame (%d byte%s missing) from %s\n",
- progname, sizeof(s) - cc,
+ "%s: incomplete frame (%ld byte%s missing) from %s\n",
+ progname, (long) sizeof(s) - cc,
"s" + (sizeof(s) - cc == 1),
inname ? inname : "stdin" );
gsm_destroy(r);
@@ -624,8 +624,6 @@ static int process_decode P0()
static int process P1((name), char * name)
{
- int step = 0;
-
out = (FILE *)0;
in = (FILE *)0;
@@ -779,7 +777,6 @@ int main P2((ac, av), int ac, char **av)
case 'h': help(); exit(0);
default:
- usage:
fprintf(stderr,
"Usage: %s [-fcpdhvuaslFC] [files...] (-h for help)\n",
progname);

+ 67
- 0
libs/libao/Makefile View File

@ -0,0 +1,67 @@
#
# Copyright (C) 2006-2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libao
PKG_VERSION:=1.2.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://downloads.xiph.org/releases/ao/
PKG_MD5SUM:=9f5dd20d7e95fd0dd72df5353829f097
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILE:=COPYING
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/libao
SECTION:=libs
DEPENDS:=+alsa-lib
CATEGORY:=Libraries
TITLE:=A cross platform audio library
URL:=http://www.xiph.org/ao/
endef
define Package/libao/description
Libao is a cross-platform audio library that allows programs to
output audio using a simple API on a wide variety of platforms.
endef
CONFIGURE_ARGS += \
--enable-shared \
--enable-static \
--disable-esd \
--disable-arts \
--disable-nas \
--disable-pulse
TARGET_CFLAGS += $(FPIC)
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/ao $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libao.{a,so*} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/ao.pc $(1)/usr/lib/pkgconfig/
endef
define Package/libao/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libao.so.* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/ao/plugins-4
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ao/plugins-4/lib*.so $(1)/usr/lib/ao/plugins-4/
endef
$(eval $(call BuildPackage,libao))

+ 85
- 0
sound/lame/Makefile View File

@ -0,0 +1,85 @@
#
# Copyright (C) 2007-2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# blogic@openwrt.org
include $(TOPDIR)/rules.mk
PKG_NAME:=lame
PKG_VERSION:=3.99.5
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/lame
PKG_MD5SUM:=84835b313d4a8b68f5349816d33e07ce
PKG_FIXUP:=autoreconf
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=LGPLv2
PKG_LICENSE_FILES:=COPYING LICENSE
include $(INCLUDE_DIR)/package.mk
PKG_INSTALL=1
define Package/lame/Default
SECTION:=sound
CATEGORY:=Sound
URL:=http://sourceforge.net/projects/lame
DEPENDS:=@BUILD_PATENTED
endef
define Package/lame
$(call Package/lame/Default)
TITLE:=lame
MENU:=1
DEPENDS += +libncurses
endef
define Package/lame/description
lame mp3 encoder
endef
define Package/lame-lib
$(call Package/lame/Default)
TITLE:=lame-lib
endef
define Package/lame-lib/description
lame mp3 encoder libs
endef
define Build/Configure
$(call Build/Configure/Default, \
--disable-nasm \
)
endef
define Package/lame/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lame $(1)/usr/bin/
endef
define Package/lame-lib/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*so* $(1)/usr/lib/
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/lame
$(INSTALL_DATA) \
$(PKG_INSTALL_DIR)/usr/include/lame/*.h \
$(1)/usr/include/lame/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/*.{la,so*} \
$(1)/usr/lib/
endef
$(eval $(call BuildPackage,lame-lib))
$(eval $(call BuildPackage,lame))

+ 33
- 0
sound/lame/patches/001-automake-compat.patch View File

@ -0,0 +1,33 @@
--- a/configure.in
+++ b/configure.in
@@ -393,7 +393,7 @@ CONFIG_MATH_LIB="${USE_LIBM}"
dnl configure use of features
-AM_PATH_GTK(1.2.0, HAVE_GTK="yes", HAVE_GTK="no")
+HAVE_GTK="no"
dnl ElectricFence malloc debugging
AC_MSG_CHECKING(use of ElectricFence malloc debugging)
--- a/frontend/Makefile.am
+++ b/frontend/Makefile.am
@@ -35,7 +35,7 @@ lame_SOURCES = lame_main.c $(common_sour
mp3rtp_SOURCES = mp3rtp.c rtp.c $(common_sources)
mp3x_SOURCES = mp3x.c gtkanal.c gpkplotting.c $(common_sources)
-CFLAGS = @CFLAGS@ @GTK_CFLAGS@ @FRONTEND_CFLAGS@ @SNDFILE_CFLAGS@
+CFLAGS = @CFLAGS@ @FRONTEND_CFLAGS@ @SNDFILE_CFLAGS@
LDFLAGS = @LDFLAGS@ @FRONTEND_LDFLAGS@ @SNDFILE_LIBS@
INCLUDES = -I$(top_srcdir)/libmp3lame -I$(top_srcdir)/include -I$(top_builddir)
--- a/frontend/Makefile.in
+++ b/frontend/Makefile.in
@@ -99,7 +99,7 @@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@ @GTK_CFLAGS@ @FRONTEND_CFLAGS@ @SNDFILE_CFLAGS@
+CFLAGS = @CFLAGS@ @FRONTEND_CFLAGS@ @SNDFILE_CFLAGS@
CONFIG_DEFS = @CONFIG_DEFS@
CONFIG_MATH_LIB = @CONFIG_MATH_LIB@
CPP = @CPP@

Loading…
Cancel
Save