dcadec: Switch to 0.2.0 release

This commit is contained in:
James Ross-Gowan
2016-01-19 21:28:42 +11:00
parent 66e9326097
commit 6f49ea262d
7 changed files with 44 additions and 59 deletions

View File

@@ -1,33 +0,0 @@
From 52ee72e4e5046d3e04b8c6c3c866d4cd6c607850 Mon Sep 17 00:00:00 2001
From: Yuta NAKAI <nak5124@live.jp>
Date: Wed, 29 Apr 2015 00:24:00 +0900
Subject: [PATCH 4/5] Makefile: Add API version suffix to DLL Name.
---
Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 0f4c6c5..6a32ec3 100644
--- a/Makefile
+++ b/Makefile
@@ -8,6 +8,7 @@ LIBDIR ?= $(PREFIX)/lib
INCLUDEDIR ?= $(PREFIX)/include
SRC_DIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
+API_VER=$(shell grep -e '\#define DCADEC_VERSION_MAJOR' $(SRC_DIR)/libdcadec/dca_context.h | awk '{ printf $$3 }')
vpath %.c $(SRC_DIR)
vpath %.h $(SRC_DIR)
vpath %.pc.in $(SRC_DIR)
@@ -33,7 +34,7 @@ else
endif
ifdef CONFIG_SHARED
- OUT_LIB ?= libdcadec/libdcadec$(DLLSUF)
+ OUT_LIB ?= libdcadec/libdcadec-$(API_VER)$(DLLSUF)
else
OUT_LIB ?= libdcadec/libdcadec$(LIBSUF)
endif
--
2.4.3

View File

@@ -0,0 +1,25 @@
From ae2b809cec3fd845f05508e288a0f048f93d98e5 Mon Sep 17 00:00:00 2001
From: James Ross-Gowan <rossymiles@gmail.com>
Date: Tue, 19 Jan 2016 18:31:29 +1100
Subject: [PATCH] Makefile: Add API version suffix to DLL Name
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 20354a7..051b898 100644
--- a/Makefile
+++ b/Makefile
@@ -40,7 +40,7 @@ else
endif
ifdef CONFIG_SHARED
- OUT_LIB ?= libdcadec/libdcadec$(DLLSUF)$(SONAMESUF)
+ OUT_LIB ?= libdcadec/libdcadec-$(API_MAJOR)$(DLLSUF)
else
OUT_LIB ?= libdcadec/libdcadec$(LIBSUF)
endif
--
2.6.3

View File

@@ -1,39 +1,32 @@
# Maintainer: Yuta Nakai <nak5124@live.jp>
_realname=dcadec
pkgbase=mingw-w64-${_realname}-git
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git"
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgdesc='dcadec is a free DTS Coherent Acoustics decoder with support for HD extensions (mingw-w64)'
pkgver=0.0.0.207.2a9186e
pkgrel=4
pkgver=0.2.0
pkgrel=1
arch=('any')
url='https://github.com/foo86/dcadec.git'
url='https://github.com/foo86/dcadec'
license=('LGPL')
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" 'git')
replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}-git")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc")
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs")
source=("${_realname}"::'git+https://github.com/foo86/dcadec.git'
source=(${_realname}-${pkgver}.tar.gz::"https://github.com/foo86/dcadec/archive/v${pkgver}.tar.gz"
'0001-Makefile-Don-t-set-static-libgcc-on-mingw-systems.patch'
'0002-Makefile-Install-windows-DLL-to-BINDIR.patch'
'0003-Makefile-On-windows-install-import-library.patch'
'0004-Makefile-Add-API-version-suffix-to-DLL-Name.patch'
'0005-Makefile-Add-install-cut.patch')
sha512sums=('SKIP'
sha512sums=('94edcc0b4449882ebeb08f8b39fe44a5302731df2dad3a3e0b0f787fd7c2c3e3992fed95e6f594af516e982cec34b057aab30e6457c098df61f495a487125acb'
'80469f7ad04d7c247dda9c56d7aa9771c3b6ddd8aa238604be7b325ae7ac87cbdfa8668d2212adfa69ddaad3bdd7cad631f0b226255fb5cb6b432f66f6dc8de3'
'ec11e3a5c300f709f8660c411aaafc98982100a346ad28242640103c2147aaa6dbefdb2a24e5d9198e29111f95fa18faccfd2394a9677c305028e049b4b9879f'
'f2f7b99dcaf6f4b9d1ffd2ed0dd6f61c6eaba6ee7425752f428e864cec135fc6a4c6c6cf001bfc598ba4a8a487b85a59cfba93a5f59d71bc4a286400efbea985'
'6bebd8dba0d7b6dd39c69cb891e4103a47a006b7ad4ee110e9c81e3af70a3aa42d803744790d7150e701d1ea15851929ec23bc5c958ab69d3543774a8ad4fe83'
'd4839f9d9016fe957e9c7b1b6c45fe5b21a1db8f1e2ef96295cb37a59e87c591c8c8681755df4600c7d441d7d1268e621264d5b14cdcb092e33216b44f158287'
'9ae1446ac65d635858afa05f90734990d08096758bf03a24b9a74d98255643d90badd905e2718eeb97c4a79375c6714585d43c69f47e573d0d7497cc55dcd018')
pkgver() {
cd "${srcdir}"/${_realname}
local _major=$(grep -e '\#define DCADEC_VERSION_MAJOR' libdcadec/dca_context.h | awk '{ printf $3 }')
local _minor=$(grep -e '\#define DCADEC_VERSION_MINOR' libdcadec/dca_context.h | awk '{ printf $3 }')
local _patch=$(grep -e '\#define DCADEC_VERSION_PATCH' libdcadec/dca_context.h | awk '{ printf $3 }')
printf "%s.%s.%s.%s.%s" "${_major}" "${_minor}" "${_patch}" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd "${srcdir}"/${_realname}
cd "${srcdir}/${_realname}-${pkgver}"
patch -p1 -i "${srcdir}"/0001-Makefile-Don-t-set-static-libgcc-on-mingw-systems.patch
patch -p1 -i "${srcdir}"/0002-Makefile-Install-windows-DLL-to-BINDIR.patch
@@ -47,26 +40,26 @@ build() {
mkdir -p "${srcdir}"/build-shared-$CARCH
cd "${srcdir}"/build-shared-$CARCH
make clean -f ../${_realname}/Makefile
make clean -f "${srcdir}/${_realname}-${pkgver}/Makefile"
PREFIX=$MINGW_PREFIX \
CONFIG_NDEBUG=1 \
CONFIG_WINDOWS=1 \
CONFIG_SHARED=1 \
CC=gcc \
make all -f ../${_realname}/Makefile
make all -f "${srcdir}/${_realname}-${pkgver}/Makefile"
# Build static lib.
mkdir -p "${srcdir}"/build-static-$CARCH
cd "${srcdir}"/build-static-$CARCH
make clean -f ../${_realname}/Makefile
make clean -f "${srcdir}/${_realname}-${pkgver}/Makefile"
PREFIX=$MINGW_PREFIX \
CONFIG_NDEBUG=1 \
CONFIG_WINDOWS=1 \
CC=gcc \
make lib -f ../${_realname}/Makefile
make lib -f "${srcdir}/${_realname}-${pkgver}/Makefile"
}
package() {
@@ -78,7 +71,7 @@ package() {
CONFIG_WINDOWS=1 \
CONFIG_SHARED=1 \
DESTDIR="${pkgdir}" \
make install install-cut -f ../${_realname}/Makefile
make install install-cut -f "${srcdir}/${_realname}-${pkgver}/Makefile"
# Install static lib.
cd "${srcdir}"/build-static-$CARCH
@@ -87,12 +80,12 @@ package() {
CONFIG_NDEBUG=1 \
CONFIG_WINDOWS=1 \
DESTDIR="${pkgdir}" \
make install-lib -f ../${_realname}/Makefile
make install-lib -f "${srcdir}/${_realname}-${pkgver}/Makefile"
# Install LICENSE file.
cd "${srcdir}"/${_realname}
cd "${srcdir}/${_realname}-${pkgver}"
install -Dm644 COPYING.LGPLv2.1 "${pkgdir}"${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE
# Rename dcadec executable to not conflict with libdca
mv ${pkgdir}${MINGW_PREFIX}/bin/dcadec{,0}.exe
}