diff options
author | Daniel Bermond | 2019-06-09 16:28:22 +0000 |
---|---|---|
committer | Daniel Bermond | 2019-06-09 16:28:22 +0000 |
commit | 52ca1a1a3069153a43192242f9653e9d63361b26 (patch) | |
tree | 33a333833b5466634cf8da2a94df3e9145149936 | |
download | aur-52ca1a1a3069153a43192242f9653e9d63361b26.tar.gz |
Initial commit of hm-svn
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | 0001-hm-svn-fix-build-with-gcc8.patch | 14 | ||||
-rw-r--r-- | 0002-hm-svn-use-arch-flags.patch | 100 | ||||
-rw-r--r-- | PKGBUILD | 57 |
4 files changed, 192 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..3ec2dca44c66 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = hm-svn + pkgdesc = HEVC Test Model - the reference software for HEVC (svn version) + pkgver = 16.20.r4998 + pkgrel = 1 + url = https://hevc.hhi.fraunhofer.de/ + arch = x86_64 + license = BSD + makedepends = subversion + makedepends = nasm + depends = gcc-libs + provides = hm + conflicts = hm + source = hm::svn+https://hevc.hhi.fraunhofer.de/svn/svn_HEVCSoftware/branches/HM-dev/ + source = 0001-hm-svn-fix-build-with-gcc8.patch + source = 0002-hm-svn-use-arch-flags.patch + sha256sums = SKIP + sha256sums = 1fc52f8507902c7ee315bb7fbe42914dd4b0b49251d237b2e024e6e776ba02c3 + sha256sums = da19d17edfb2acac3feaedaf8169d84da3b6675de4c70b32d9a3d3144b9fc59f + +pkgname = hm-svn + diff --git a/0001-hm-svn-fix-build-with-gcc8.patch b/0001-hm-svn-fix-build-with-gcc8.patch new file mode 100644 index 000000000000..81f005f9d0e5 --- /dev/null +++ b/0001-hm-svn-fix-build-with-gcc8.patch @@ -0,0 +1,14 @@ +diff -Naurp a/build/linux/common/makefile.base b/build/linux/common/makefile.base +--- a/build/linux/common/makefile.base 2018-07-12 13:14:54.000000000 +0000 ++++ b/build/linux/common/makefile.base 2019-06-09 13:48:00.616470452 +0000 +@@ -47,8 +47,8 @@ endif + + # default cpp flags for all configurations + #CPPFLAGS = -Wall $(DEFS) -I$(CURDIR)/$(INC_DIR) $(USER_INC_DIRS) +-CPPFLAGS = $(DEFS) -I$(CURDIR)/$(INC_DIR) $(USER_INC_DIRS) -Wall -Wshadow -Wno-sign-compare -Werror -std=c++11 +-CFLAGS = $(DEFS) -I$(CURDIR)/$(INC_DIR) $(USER_INC_DIRS) -Wall -Wshadow -Wno-sign-compare -Werror ++CPPFLAGS = $(DEFS) -I$(CURDIR)/$(INC_DIR) $(USER_INC_DIRS) -Wall -Wshadow -Wno-sign-compare -std=c++11 ++CFLAGS = $(DEFS) -I$(CURDIR)/$(INC_DIR) $(USER_INC_DIRS) -Wall -Wshadow -Wno-sign-compare + + ########## + # enforce 32-bit build : 1=yes, 0=no diff --git a/0002-hm-svn-use-arch-flags.patch b/0002-hm-svn-use-arch-flags.patch new file mode 100644 index 000000000000..644c6c5a852f --- /dev/null +++ b/0002-hm-svn-use-arch-flags.patch @@ -0,0 +1,100 @@ +diff -Naurp a/build/linux/common/makefile.base b/build/linux/common/makefile.base +--- a/build/linux/common/makefile.base 2019-06-09 14:04:51.000000000 +0000 ++++ b/build/linux/common/makefile.base 2019-06-09 14:06:58.251352310 +0000 +@@ -46,36 +46,36 @@ endif + ######################################################### + + # default cpp flags for all configurations +-#CPPFLAGS = -Wall $(DEFS) -I$(CURDIR)/$(INC_DIR) $(USER_INC_DIRS) +-CPPFLAGS = $(DEFS) -I$(CURDIR)/$(INC_DIR) $(USER_INC_DIRS) -Wall -Wshadow -Wno-sign-compare -std=c++11 +-CFLAGS = $(DEFS) -I$(CURDIR)/$(INC_DIR) $(USER_INC_DIRS) -Wall -Wshadow -Wno-sign-compare ++#CXXFLAGS = -Wall $(DEFS) -I$(CURDIR)/$(INC_DIR) $(USER_INC_DIRS) ++CXXFLAGS += $(DEFS) -I$(CURDIR)/$(INC_DIR) $(USER_INC_DIRS) -Wall -Wshadow -Wno-sign-compare -std=c++11 ++CFLAGS += $(DEFS) -I$(CURDIR)/$(INC_DIR) $(USER_INC_DIRS) -Wall -Wshadow -Wno-sign-compare + + ########## + # enforce 32-bit build : 1=yes, 0=no + ########## + M32?= 0 + ifeq ($(M32),1) +-CPPFLAGS+=-m32 ++CXXFLAGS+=-m32 + endif + ########## + + ifeq ($(HIGHBITDEPTH), 1) +-CPPFLAGS+="-DRExt__HIGH_BIT_DEPTH_SUPPORT=1" ++CXXFLAGS+="-DRExt__HIGH_BIT_DEPTH_SUPPORT=1" + endif + + ifeq ($(EXTENSION_360_VIDEO), 1) +- CPPFLAGS+=-DEXTENSION_360_VIDEO=1 ++ CXXFLAGS+=-DEXTENSION_360_VIDEO=1 + else +- CPPFLAGS+=-DEXTENSION_360_VIDEO=0 ++ CXXFLAGS+=-DEXTENSION_360_VIDEO=0 + endif + + # + # debug cpp flags +-DEBUG_CPPFLAGS = -g -D_DEBUG ++DEBUG_CXXFLAGS = -g -D_DEBUG + DEBUG_CFLAGS = -g -D_DEBUG + # + # release cpp +-RELEASE_CPPFLAGS = -O3 -Wuninitialized ++RELEASE_CXXFLAGS = -O3 -Wuninitialized + RELEASE_CFLAGS = -O3 -Wuninitialized + + +@@ -113,7 +113,7 @@ endif + ifeq ($(CONFIG), LIBRARY) + # linker flags for library + # LDFLAGS = $(ALL_LDFLAGS) -shared -Wl,-Bsymbolic +-LDFLAGS = $(ALL_LDFLAGS) -shared ++LDFLAGS += $(ALL_LDFLAGS) -shared + # + # debug linker flags for library + DEBUG_LDFLAGS = -Wl,-soname,lib$(PRJ_NAME)d.so.$(VER) +@@ -124,7 +124,7 @@ RELEASE_LDFLAGS = -Wl,-soname,lib$(PRJ + else + ifeq ($(CONFIG), CONSOLE) + # linker flags for console +-LDFLAGS = $(ALL_LDFLAGS) ++LDFLAGS += $(ALL_LDFLAGS) + # + # debug linker flags for console + DEBUG_LDFLAGS = +@@ -208,28 +208,28 @@ $(OBJ_DIR)/%.d.o: $(SRC_DIR4)/%.asm + # see also: http://make.paulandlesley.org/autodep.html + # 2005-01-25 Steffen Kamp (kamp@ient.rwth-aachen.de), RWTH Aachen + define COMPILE_AND_DEPEND_RELEASE +- $(CPP) -c -MMD -MF $(OBJ_DIR)/$*.r.d -MT $(OBJ_DIR)/$*.r.o $(CPPFLAGS) $(RELEASE_CPPFLAGS) -o $@ $(CURDIR)/$< ++ $(CPP) -c -MMD -MF $(OBJ_DIR)/$*.r.d -MT $(OBJ_DIR)/$*.r.o $(CXXFLAGS) $(RELEASE_CXXFLAGS) $(CPPFLAGS) -o $@ $(CURDIR)/$< + @cp $(OBJ_DIR)/$*.r.d $(OBJ_DIR)/$*.r.P; \ + sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ + -e '/^$$/ d' -e 's/$$/ :/' < $(OBJ_DIR)/$*.r.d >> $(OBJ_DIR)/$*.r.P; \ + rm -f $(OBJ_DIR)/$*.r.d + endef + define COMPILE_AND_DEPEND_DEBUG +- $(CPP) -c -MMD -MF $(OBJ_DIR)/$*.d.d -MT $(OBJ_DIR)/$*.d.o $(CPPFLAGS) $(DEBUG_CPPFLAGS) -o $@ $(CURDIR)/$< ++ $(CPP) -c -MMD -MF $(OBJ_DIR)/$*.d.d -MT $(OBJ_DIR)/$*.d.o $(CXXFLAGS) $(DEBUG_CXXFLAGS) $(CPPFLAGS) -o $@ $(CURDIR)/$< + @cp $(OBJ_DIR)/$*.d.d $(OBJ_DIR)/$*.d.P; \ + sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ + -e '/^$$/ d' -e 's/$$/ :/' < $(OBJ_DIR)/$*.d.d >> $(OBJ_DIR)/$*.d.P; \ + rm -f $(OBJ_DIR)/$*.d.d + endef + define COMPILE_AND_DEPEND_RELEASE_C +- $(CC) -c -MMD -MF $(OBJ_DIR)/$*.r.d -MT $(OBJ_DIR)/$*.r.o $(CFLAGS) $(RELEASE_CFLAGS) -o $@ $(CURDIR)/$< ++ $(CC) -c -MMD -MF $(OBJ_DIR)/$*.r.d -MT $(OBJ_DIR)/$*.r.o $(CFLAGS) $(RELEASE_CFLAGS) $(CPPFLAGS) -o $@ $(CURDIR)/$< + @cp $(OBJ_DIR)/$*.r.d $(OBJ_DIR)/$*.r.P; \ + sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ + -e '/^$$/ d' -e 's/$$/ :/' < $(OBJ_DIR)/$*.r.d >> $(OBJ_DIR)/$*.r.P; \ + rm -f $(OBJ_DIR)/$*.r.d + endef + define COMPILE_AND_DEPEND_DEBUG_C +- $(CC) -c -MMD -MF $(OBJ_DIR)/$*.d.d -MT $(OBJ_DIR)/$*.d.o $(CFLAGS) $(DEBUG_CFLAGS) -o $@ $(CURDIR)/$< ++ $(CC) -c -MMD -MF $(OBJ_DIR)/$*.d.d -MT $(OBJ_DIR)/$*.d.o $(CFLAGS) $(DEBUG_CFLAGS) $(CPPFLAGS) -o $@ $(CURDIR)/$< + @cp $(OBJ_DIR)/$*.d.d $(OBJ_DIR)/$*.d.P; \ + sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ + -e '/^$$/ d' -e 's/$$/ :/' < $(OBJ_DIR)/$*.d.d >> $(OBJ_DIR)/$*.d.P; \ diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..6dcefc70abee --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,57 @@ +# Maintainer: Daniel Bermond < gmail-com: danielbermond > + +pkgname=hm-svn +pkgver=16.20.r4998 +pkgrel=1 +pkgdesc='HEVC Test Model - the reference software for HEVC (svn version)' +arch=('x86_64') +url='https://hevc.hhi.fraunhofer.de/' +license=('BSD') +depends=('gcc-libs') +makedepends=('subversion' 'nasm') +provides=('hm') +conflicts=('hm') +source=('hm'::'svn+https://hevc.hhi.fraunhofer.de/svn/svn_HEVCSoftware/branches/HM-dev/' + '0001-hm-svn-fix-build-with-gcc8.patch' + '0002-hm-svn-use-arch-flags.patch') +sha256sums=('SKIP' + '1fc52f8507902c7ee315bb7fbe42914dd4b0b49251d237b2e024e6e776ba02c3' + 'da19d17edfb2acac3feaedaf8169d84da3b6675de4c70b32d9a3d3144b9fc59f') + +prepare() { + cd hm + + # fix build with gcc8 (do not treat warnings as errors) + patch -Np1 -i "${srcdir}/0001-hm-svn-fix-build-with-gcc8.patch" + + # use Arch build flags (add full relro and other improvements) + patch -Np1 -i "${srcdir}/0002-hm-svn-use-arch-flags.patch" +} + +pkgver() { + cd hm + + local _version + local _revision + + _version="$(awk '/NV_VERSION/ { gsub("\"", ""); print $3 }' source/Lib/TLibCommon/CommonDef.h)" + _revision="$(svnversion | tr -d 'A-z')" + + printf '%s.r%s' "$_version" "$_revision" +} + +build() { + cd hm/build/linux + + # may randomly fail with multiple jobs + make -j1 -f makefile release{,_highbitdepth} +} + +package() { + cd hm + + install -D -m755 bin/* -t "${pkgdir}/usr/bin" + install -D -m644 README -t "${pkgdir}/usr/share/doc/${pkgname}" + install -D -m644 doc/*.pdf -t "${pkgdir}/usr/share/doc/${pkgname}" + install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} |