l-smash: New package.

This commit is contained in:
Yuta NAKAI
2014-10-11 02:27:53 +09:00
parent 33579362e4
commit deb8b70180
3 changed files with 117 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
From 9baf4401312b97f699a797997557440302de38da Mon Sep 17 00:00:00 2001
From: Yuta NAKAI <nak5124@live.jp>
Date: Sun, 28 Sep 2014 04:06:29 +0900
Subject: [PATCH 1/3] configure: Check whether SRCDIR is git repo or not.
This is for building from a released tarball.
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure
index 961aa12..5a76e73 100755
--- a/configure
+++ b/configure
@@ -304,7 +304,7 @@ CURDIR="$PWD"
cd $SRCDIR
VER=$MAJVER.$MINVER.$MICVER
REV="$(git rev-list HEAD 2> /dev/null | wc -l)"
-if test $REV -ne 0; then
+if test -d .git -a $REV -ne 0; then
VER_STRING="$VER rev.$REV"
else
VER_STRING="$VER"
--
2.1.1

View File

@@ -0,0 +1,49 @@
From e41df129b8ef234ecddd68ecba425e41430dedbe Mon Sep 17 00:00:00 2001
From: Yuta NAKAI <nak5124@live.jp>
Date: Sun, 28 Sep 2014 04:10:10 +0900
Subject: [PATCH 2/3] configure: Add api version to mingw shared library name.
---
Makefile | 6 ++++++
configure | 1 +
2 files changed, 7 insertions(+)
diff --git a/Makefile b/Makefile
index 83ecb0f..4f7a7a5 100644
--- a/Makefile
+++ b/Makefile
@@ -31,6 +31,9 @@ $(SHAREDLIBNAME): $(OBJS)
ifeq ($(SHAREDLIBNAME), liblsmash.so.$(MAJVER))
ln -s $(SHAREDLIBNAME) liblsmash.so
endif
+ifeq ($(SHAREDLIBNAME), liblsmash-$(MAJVER).dll)
+ ln -fs $(SHAREDLIBNAME) liblsmash.dll
+endif
# $(TOOLS) is automatically generated as config.mak2 by configure.
# The reason for having config.mak2 is for making this Makefile easy to read.
@@ -56,6 +59,9 @@ ifneq ($(IMPLIB),)
install -m 644 $(IMPLIB) $(DESTDIR)$(libdir)
install -d $(DESTDIR)$(bindir)
install -m 755 $(SHAREDLIB) $(DESTDIR)$(bindir)
+ifeq ($(SHAREDLIB), liblsmash-$(MAJVER).dll)
+ ln -fs $(DESTDIR)$(bindir)/$(SHAREDLIB) $(DESTDIR)$(bindir)/liblsmash.dll
+endif
else
install -m 644 $(SHAREDLIB) $(DESTDIR)$(libdir)
ifeq ($(SHAREDLIB), liblsmash.so.$(MAJVER))
diff --git a/configure b/configure
index 5a76e73..36e0d41 100755
--- a/configure
+++ b/configure
@@ -204,6 +204,7 @@ fi
case "$TARGET_OS" in
*mingw*)
EXT=".exe"
+ SHARED_NAME="liblsmash-$MAJVER"
SHARED_EXT=".dll"
IMPLIB="liblsmash.dll.a"
SO_LDFLAGS="-shared -Wl,--out-implib,$IMPLIB"
--
2.1.1

View File

@@ -0,0 +1,42 @@
# Maintainer: Yuta Nakai <nak5124@live.jp>
_realname=l-smash
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgdesc="Loyal to Spec of Mpeg4 and Ad-hoc Simple Hackwork. Yet another opensource mp4 handler (mingw-w64)"
pkgver=1.13.27
pkgrel=1
arch=('any')
url="http://l-smash.github.io/l-smash/"
license=('ISC')
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc")
options=('strip' 'staticlibs')
source=(${_realname}-${pkgver}.tar.gz::"https://github.com/l-smash/l-smash/archive/v${pkgver}.tar.gz"
'0001-configure-Check-whether-SRCDIR-is-git-repo-or-not.patch'
'0002-configure-Add-api-version-to-mingw-shared-library-na.patch')
md5sums=('cdcd065bfe97adbfe2f41cb3620bc294'
'915563c94a120946afd06308956a3be7'
'8dc7295da0e138ab7e9656c2248144f7')
prepare() {
cd ${srcdir}/${_realname}-${pkgver}
patch -p1 -i ${srcdir}/0001-configure-Check-whether-SRCDIR-is-git-repo-or-not.patch
patch -p1 -i ${srcdir}/0002-configure-Add-api-version-to-mingw-shared-library-na.patch
}
build() {
mkdir -p ${srcdir}/build-${MINGW_CHOST}
cd ${srcdir}/build-${MINGW_CHOST}
../${_realname}-${pkgver}/configure \
--prefix=${MINGW_PREFIX} \
--enable-shared
make ${MAKEFLAGS}
}
package() {
cd ${srcdir}/build-${MINGW_CHOST}
make DESTDIR=${pkgdir} install
install -Dm644 ${srcdir}/${_realname}-${pkgver}/LICENSE ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE
}