From 8c94da947a325057e560586e0095be5c5609b66b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Fri, 27 Jan 2017 18:13:41 +0100 Subject: [PATCH] New package: atomicparsley-0.9.0 Closes #5618 --- .../atomicparsley/patches/musl-fpos_t.patch | 28 +++++++++++++ .../atomicparsley/patches/use-stdint_h.patch | 42 +++++++++++++++++++ srcpkgs/atomicparsley/template | 30 +++++++++++++ 3 files changed, 100 insertions(+) create mode 100644 srcpkgs/atomicparsley/patches/musl-fpos_t.patch create mode 100644 srcpkgs/atomicparsley/patches/use-stdint_h.patch create mode 100644 srcpkgs/atomicparsley/template diff --git a/srcpkgs/atomicparsley/patches/musl-fpos_t.patch b/srcpkgs/atomicparsley/patches/musl-fpos_t.patch new file mode 100644 index 00000000000..a33e0c12d60 --- /dev/null +++ b/srcpkgs/atomicparsley/patches/musl-fpos_t.patch @@ -0,0 +1,28 @@ +--- AtomicParsley.cpp 2017-01-27 18:09:38.871046030 +0100 ++++ AtomicParsley.cpp 2017-01-27 18:10:35.548088839 +0100 +@@ -4585,10 +4585,10 @@ + #if defined(_MSC_VER) + fpos_t file_offset = dest_position + file_pos; + #elif defined(__GLIBC__) +- fpos_t file_offset = {0}; ++ fpos_t file_offset = {0}; + file_offset.__pos = dest_position + file_pos; + #else +- off_t file_offset = dest_position + file_pos; ++ fpos_t file_offset = {dest_position + file_pos}; + #endif + fsetpos(dest_file, &file_offset); + fwrite(buffer, (size_t)max_buffer, 1, dest_file); +@@ -4601,10 +4601,10 @@ + #if defined(_MSC_VER) + fpos_t file_offset = dest_position + file_pos; + #elif defined(__GLIBC__) +- fpos_t file_offset = {0}; ++ fpos_t file_offset = {0}; + file_offset.__pos = dest_position + file_pos; + #else +- off_t file_offset = dest_position + file_pos; ++ fpos_t file_offset = {dest_position + file_pos}; + #endif + fsetpos(dest_file, &file_offset ); + fwrite(buffer, (size_t)(src_file_size - file_pos), 1, dest_file); diff --git a/srcpkgs/atomicparsley/patches/use-stdint_h.patch b/srcpkgs/atomicparsley/patches/use-stdint_h.patch new file mode 100644 index 00000000000..4b8a354168d --- /dev/null +++ b/srcpkgs/atomicparsley/patches/use-stdint_h.patch @@ -0,0 +1,42 @@ +Instead of defining the integer types locally include + +--- AP_commons.h 2006-08-27 04:35:15.000000000 +0200 ++++ AP_commons.h 2017-01-27 18:01:09.520651784 +0100 +@@ -21,36 +21,7 @@ + + #include + #include +- +-#ifndef _UINT8_T +-#define _UINT8_T +-typedef unsigned char uint8_t; +-#endif /*_UINT8_T */ +- +-#ifndef _UINT16_T +-#define _UINT16_T +-typedef unsigned short uint16_t; +-#endif /* _UINT16_T */ +- +-#ifndef _UINT32_T +-#ifndef __uint32_t_defined +-typedef unsigned int uint32_t; +-#endif +-#endif /*_UINT32_T */ +- +-#ifndef _UINT64_T +-#define _UINT64_T +-#if defined (_MSC_VER) +-typedef unsigned __int64 uint64_t; +-#else +-typedef unsigned long long uint64_t; +-#endif /* _MSC_VER */ +-#endif /* _UINT64_T */ +- +-#ifndef _INT16_T +-#define _INT16_T +-typedef short int16_t; +-#endif /* _INT16_T */ ++#include + + #if defined (__ppc__) || defined (__ppc64__) + #define SWAP16(x) (x) diff --git a/srcpkgs/atomicparsley/template b/srcpkgs/atomicparsley/template new file mode 100644 index 00000000000..17a5dd14117 --- /dev/null +++ b/srcpkgs/atomicparsley/template @@ -0,0 +1,30 @@ +# Template file for 'atomicparsley'. +pkgname=atomicparsley +version=0.9.0 +revision=1 +hostmakedepends="unzip" +short_desc="Lightweight program for manipulating MPEG-4 metadata" +maintainer="svenper " +license="GPL-2" +homepage="http://atomicparsley.sourceforge.net" +distfiles="${SOURCEFORGE_SITE}/${pkgname}/AtomicParsley-source-${version}.zip" +checksum=de83f219f95e6fe59099b277e3ced86f0430ad9468e845783092821dff15a72e +wrksrc=AtomicParsley-source-${version} +nopie=yes + +pre_build() { + sed -ri 's/(char\*.*strrchr.*)/const \1/g' AtomicParsley.cpp + sed -ri 's/(char\* suffix = NULL;)/const \1/g' AtomicParsley.cpp + sed -ri 's/(^[[:space:]]*g\+\+)/\1 \$CXXFLAGS/g' build + sed -ri 's/(^[[:space:]])*g\+\+/"\1\$CXX"/g' build + sed -ri 's/(-o.*(obj_files.*){8})/\$LDFLAGS \1/g' build +} + +do_build() { + CXX="${CXX:-g++}" LD="$CXX" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" ./build +} + +do_install() { + vbin AtomicParsley + vlicense COPYING +}