libimobiledevice / libplist

A library to handle Apple Property List format in binary or XML
https://libimobiledevice.org
GNU Lesser General Public License v2.1
528 stars 304 forks source link

Building from released source (zipfile or tar.gz tarball) is broken by PACKAGE_VERSION issue. #228

Closed fduncanh closed 1 year ago

fduncanh commented 1 year ago
configure: error: PACKAGE_VERSION is not defined. Make sure to configure a source tree checked out from git or that .tarball-version is present.

Not everyone will want to build from a git clone, but might use the release zip or tar files. Is there a workaround for this PACKAGE_VERSION issue?

fduncanh commented 1 year ago

./configure in the libplist-2.3.0-tar.bz2 works.

the old ./autogen.sh stuff is in the libplist-2.3.0.tar.gz and libplist-2.3.0.zip

presumably the tar.gz and .zip release files should be replaced with the contents of the tar.bz2 file? (or are they just there for compatibility with older versions?)

nikias commented 1 year ago

Yes, the .tar.bz2 archive is manually uploaded, while the .zip and .tar.gz are automatic links that GitHub posts with the release which is just a plain checkout from git. I am not sure if this is configurable.

fduncanh commented 1 year ago

is there any workaround that would allow someone to set PACKAGE_VERSION when using the automatic github .zip and tar.gz releases (or add some release notes that say not to use them)? Ideally, README.md would address the issue.

In any case, I adapted my own README (which has a section on building libplist from source in the unlikely event that a package is not available, essentially only macOS users without HomeBrew or MacPorts) to use the tar.bz2 sources

https://github.com/FDH2/UxPlay#building-libplist--200-from-source