4f75cf25fd
```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.-][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.-][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
44 lines
1.3 KiB
Bash
44 lines
1.3 KiB
Bash
# Template file for 'tinyxml'
|
|
pkgname=tinyxml
|
|
version=2.6.2
|
|
revision=10
|
|
wrksrc="${pkgname}"
|
|
short_desc="A simple, small, C++ XML parser"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
homepage="http://www.grinninglizard.com/tinyxml/"
|
|
license="zlib"
|
|
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}_2_6_2.tar.gz"
|
|
checksum=15bdfdcec58a7da30adc87ac2b078e4417dbe5392f3afb719f9ba6d062645593
|
|
|
|
do_build() {
|
|
# Fix Makefile
|
|
sed -i \
|
|
-e '/^TINYXML_USE_STL/ s|=.*|=YES|' \
|
|
-e "s|^RELEASE_CFLAGS.*|& ${CXXFLAGS} -fPIC|" Makefile
|
|
|
|
make CXX="$CXX" CC="$CC" LD="$CXX" ${makejobs}
|
|
${CXX} -fPIC ${CXXFLAGS} -shared -o lib${sourcepkg}.so.0.${version} \
|
|
-Wl,-soname,lib${sourcepkg}.so.0 $(ls *.o | grep -v xmltest)
|
|
}
|
|
|
|
do_install() {
|
|
install -dm 0755 ${DESTDIR}/usr/{lib,lib/pkgconfig,include}
|
|
sed "s/@VERSION@/$version/" ${FILESDIR}/tinyxml.pc.in > $DESTDIR/usr/lib/pkgconfig/tinyxml.pc
|
|
install -m0755 lib${sourcepkg}.so.0.${version} ${DESTDIR}/usr/lib
|
|
install -m0644 ${sourcepkg}.h tinystr.h ${DESTDIR}/usr/include
|
|
|
|
(cd ${DESTDIR}/usr/lib
|
|
ln -s lib${sourcepkg}.so.0.${version} lib${sourcepkg}.so.0
|
|
ln -s lib${sourcepkg}.so.0.${version} lib${sourcepkg}.so
|
|
)
|
|
}
|
|
|
|
tinyxml-devel_package() {
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib/*.so
|
|
vmove usr/lib/pkgconfig
|
|
}
|
|
}
|