# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
setvar pkgname = 'id3lib'
setvar pkgver = '3.8.3'
setvar pkgrel = '0'
setvar pkgdesc = ""Library for reading, writing, and manipulating ID3v1 and ID3v2 tags""
setvar url = ""http://id3lib.sourceforge.net/""
setvar arch = ""all""
setvar license = ""LGPL""
setvar depends = """"
setvar depends_dev = ""zlib-dev""
setvar makedepends = ""$depends_dev libtool automake autoconf""
setvar install = """"
setvar subpackages = ""$pkgname-dev $pkgname-doc""
setvar source = ""http://downloads.sourceforge.net/sourceforge/id3lib/id3lib-$pkgver.tar.gz
	00-add-libz-to-compilation.patch
	15-fix-headers-of-main-functions.patch
	40-deal-with-mkstemp.patch
	60-fix_make_check.patch
	61-fix_vbr_stack_smash.patch
	05-create-m4-directory.patch
	20-create-manpages.patch             
	50-remove-outdated-check.patch
	60-id3lib-missing-nullpointer-check.patch
	10-fix-compilation-with-cpp-headers.patch
	30-fix-utf16.patch
	60-add-c-wrapper-functions.patch
	60-spelling.patch""

setvar _builddir = ""$srcdir"/id3lib-$pkgver"
proc prepare {
	local i
	cd $_builddir
	for i in $source {
		case (i) {
		*.patch { msg $i; patch -p1 -i "$srcdir"/$i || return 1}
		}
	}
}

proc build {
	cd $_builddir
	libtoolize -fc || return 1
	aclocal || return 1
	autoconf || return 1
	automake --add-missing --copy || return 1
	update_config_sub || return 1
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		|| return 1
	make || return 1
}

proc package {
	cd $_builddir
	make DESTDIR="$pkgdir" install || return 1
	install -d "${pkgdir}"/usr/share/man/man1 || return 1
	cp doc/man/* "${pkgdir}"/usr/share/man/man1 || return 1
}

setvar md5sums = ""19f27ddd2dda4b2d26a559a4f0f402a7  id3lib-3.8.3.tar.gz
9428ef38283d13adb6e349089537a63f  00-add-libz-to-compilation.patch
b3de841cd2eda0d37c8c8330119e12d4  15-fix-headers-of-main-functions.patch
d2d06d46df3867d73746f584d1e6fcc5  40-deal-with-mkstemp.patch
5c4b53a3d5543c5c50b23d6d5b9f230b  60-fix_make_check.patch
0973e285cdc420130b984a259cdd8ae0  61-fix_vbr_stack_smash.patch
5a78e0fe586fba334eae2a29e4bf5a28  05-create-m4-directory.patch
0c7c939943bdfcc3a0f6be95fe9b2367  20-create-manpages.patch
d3a61d07a2bfa83f4ac6290794789022  50-remove-outdated-check.patch
964fa0db0da7b1495b34b81bd36539fd  60-id3lib-missing-nullpointer-check.patch
88f21f1bf4f697be8030706bbec11705  10-fix-compilation-with-cpp-headers.patch
74ba59c03f91fedbe4dd8045b29c7e15  30-fix-utf16.patch
93ef4b26ad08027e28d3f80ad6e492b4  60-add-c-wrapper-functions.patch
26c74a90267892bbaca1e162919121d0  60-spelling.patch""
setvar sha256sums = ""2749cc3c0cd7280b299518b1ddf5a5bcfe2d1100614519b68702230e26c7d079  id3lib-3.8.3.tar.gz
e884395cf0bd7b44a550fc8785d79c0992d749be1edc45b00d289cbbd179c6d5  00-add-libz-to-compilation.patch
042deb7c2df1afa0851622b6086e8eb4b007cc6cfcd70210852d5c25e39b08b1  15-fix-headers-of-main-functions.patch
d7999cdb425ba8013dd11da7fb570e875d368e5b1236c2b094abee8446f04218  40-deal-with-mkstemp.patch
88aded7423f266d2fedb0eef9dbb272b53cc776ae98bd71dd5afb30b6ac48515  60-fix_make_check.patch
5a24d460c9dd1e643ac57b817ea9cec87f44c1d49381065f83879b2eea36adf7  61-fix_vbr_stack_smash.patch
c41ec6889b775119f71c25fa09bb5110bcf550a14e6aac80597479df453de5fb  05-create-m4-directory.patch
97442e14a5147df36f35d6a396e2b3fb6e155060ec672d91a68bd1a742234b4e  20-create-manpages.patch
f908af7715fb164081d191c766b040cefa0a94f1414e98f60bc38b3e0b1aa309  50-remove-outdated-check.patch
85f20c4d3467f48df1bcaa4150bae55e95270cabb542589f167a914b2f553d04  60-id3lib-missing-nullpointer-check.patch
5fb24595095596ff55d876fb3e5277000f04c4f7a3e07aff5c05e11639dc2165  10-fix-compilation-with-cpp-headers.patch
a7cce4176df773677bfc6a527a0465d460fe60a269402af9bdfc9dd6104ea6a4  30-fix-utf16.patch
1b06c5d2c36e6a1f2236c4603a934d8cd675414dcfd52b997cb584404c0bc77d  60-add-c-wrapper-functions.patch
b31bfa7213325776f6784a684f082814d3affb050d36a7c41cf1b1df07228c5c  60-spelling.patch""
setvar sha512sums = ""3787e261f86933c1c2f2bff2c4b349b42f5d8636e489e4f39f9d75e6dfbdc79b87009a0f4ce4b786f2fb3dbc01ca9d56c4112095b46244f897e6c9a28573adaf  id3lib-3.8.3.tar.gz
54a476e207f7998db5bfe287fedd50dbc5fc41a746265f39136dddd1a62beedc088631de7deae7c4fdd4583de061f251ce4391733831cf988e0d14ca95de23a1  00-add-libz-to-compilation.patch
05b74296368dfb50efce70d59114e2411add2c2a316133d6f83c5571b822bf650c32a720d2801d83538066604e7a67f394a73bff6c202051607b35a902fa2d21  15-fix-headers-of-main-functions.patch
97b1686ca3b7feefe7c2cc5f90a31f42fb55fd7baf45b0abe07c6d879bdf752f21305a6a883241c18e20847c43175c3d2c911dce14aa5f382f46bf44c07759f1  40-deal-with-mkstemp.patch
ec1333b83aca18c7d662b5f0c8d209f3f10da49194eebae66fce27c2d483bcb3528d9f39549eb1365e9dd4bd34f9fa2f86b528a17838537ba11c366aa57b38c7  60-fix_make_check.patch
b4fe59876edf87ed06183e2557b72e1b40f1d09ebd707bf1695d522ee5ad8eb75b80f3011a861505929b4e28ae9ed4037bbb2eefc3d7e8de83ef5bc495df67c5  61-fix_vbr_stack_smash.patch
46cd3b0635debc7b6445ad1bc81b14c7ee3edb0352c5f0cadceda6597c776f9d771e229ba87288a086fa2ba612dd9e089151851e033681ff31ea96190fc0f256  05-create-m4-directory.patch
a986c8186d821baef372ef61ea4c3130bc8b2d5a30d4dafbe3afdcc02b37ef3c98d300a1b43ec9c9731edc92e94acce3e975a270209b2f4fbe125fe1f484133d  20-create-manpages.patch
137732ceee8ec7fc8b686e46bd43276fba6bdcbdce166e85108e7c4b456523b4a29b11ff3101a37489e2386c92dfbe7f088f79c9c054f30515095f2b68c89f48  50-remove-outdated-check.patch
ebb536a3bce83ee8752905766f93c7920d548e85262704d617b3e608a020bca0909f5c59525caa2bbc2f034e2d11fb3eb0842d2b167e00c3ef4551c9eb57adf9  60-id3lib-missing-nullpointer-check.patch
3dffc437465c377fcc70eae27c126c9b717d22160597e01b470fb0e295eb31c4e13c27d46a5d91776793bc352f67ead7f72e041eda825dc510a3889f1cf93c36  10-fix-compilation-with-cpp-headers.patch
811e1cc121a965fd0b6162a8937475e3d7dc2a477289707a28f6961ca2b9886b98508a954b12a36c27206202673ebd9ae6ec37d175c947e4e560ac112309ec6d  30-fix-utf16.patch
404515ffe06e7d0cda8352e656fd7f55112c5edece752bcb3c1e0a9c525626f7e7d7b22cd4ef62f5da7cf43f62a2d00542dd6dd484fb0d7d7da0478ae95a373b  60-add-c-wrapper-functions.patch
a69363faa763ba589ede68edcf35ba1bded9f0ef07eeb91b38e1a7937e6791059d3fb3881bed0d3ff252064c5eb4a95285138a4d70f59fe745760f3384ddb184  60-spelling.patch""