Re: Creating a Portfile for BirdFont
Thank you. I know a lot more about packaging now and will work on the things you pointed out. I merged the patch you made in the upstream repository and added the missing files. https://gitorious.org/supplement/birdfont/commit/3a389dc02d9fae3123dde9c664ad756a6f19b256 /Johan ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: Creating a Portfile for BirdFont
On Tue, Feb 26, 2013 at 06:05:13PM +0100, Johan Mattsson wrote: > > Do you want us to include the Portfile in the MacPorts tree? > Yes, that would be nice. OK, see r103473[1]. A couple of comments: - you can use port lint --nitpick on your package. This will check for common mistakes and required variables. In your case, it showed some of the following problems: - your Portfile had trailing whitespace - the maintainers line was missing. I added you; please consider adding openmaintainer (see [2] for an explanation) - the license line was missing - there was a typo in the categories line - we usually use at least two checksums, the defaults are rmd160 and sha256. You can generate a checksum line using port -v checksum. - MacPorts should be able to pass compiler and linker flags as well as choose the compiler. (This is needed, e.g. to build universal binaries or to select a different compiler, if a platform's "gcc" will not work for the software.) I've patched the source so this can be achieved. - You could avoid running install_name_tool by building the library with the correct path in the first place. - You sometimes specified linker flags when compiling or compiler flags when linking. This is unneeded. - Your software doesn't build with clang. - I didn't find a reason why the build dependency on python33 is needed. It builds fine without it for me. - Your application builds an OS X app bundle, but doesn't install it. I added the installation of the app bundle into ${applications_dir} (by default /Applications/MacPorts/ (You might also want to change that when building your package, see macports.conf for that). While your software built correctly I still see some issues at runtime: - Lots of Icons.vala:36: Can't load icon: /opt/local/share/birdfont/icons/ Did you forget to install these icons? I couldn't verify whether the GUI looks correct, because - it doesn't start for me due to a problem in webkit-gtk. [1] https://trac.macports.org/changeset/103473 [2] https://guide.macports.org/#project.update-policies.nonmaintainer -- Clemens Lang ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: Creating a Portfile for BirdFont
> Do you want us to include the Portfile in the MacPorts tree? Yes, that would be nice. > This binary package is built with /opt/local as prefix. This will cause > problems when somebody has MacPorts installed and also installs your > binary package. See Thank you I will fix that when the rebuild of my macports installation finishes. >> I do not have DYLD_LIBRARY_PATH set. It seems to work anyway. > > OK, weird. I would have expected it to fail, but apparently the loader > does some magic here. My mistake, I forgot to uninstall an old version in /usr/local. The package is probably not working on other systems. Cheers /Johan ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: Creating a Portfile for BirdFont
On Tue, Feb 26, 2013 at 04:23:12PM +0100, Johan Mattsson wrote: > I have created a new release with the changes you propose. Glad you found a solution! > Source package: http://birdfont.org/releases/birdfont-0.18.tar.gz > Portfile: http://birdfont.org/Portfile Do you want us to include the Portfile in the MacPorts tree? > Binary package: > http://sourceforge.net/projects/birdfont/files/Birdfont/birdfont-0.18.mpkg.zip/download This binary package is built with /opt/local as prefix. This will cause problems when somebody has MacPorts installed and also installs your binary package. See http://trac.macports.org/wiki/ProblemHotlist#xmlwf for an example of this. I suggest you create a separate MacPorts installation in a different prefix (e.g., /opt/birdfont) and use that to build your binary package. See https://guide.macports.org/#installing.macports.source on how to configure MacPorts for a prefix other than /opt/local. > I do not have DYLD_LIBRARY_PATH set. It seems to work anyway. OK, weird. I would have expected it to fail, but apparently the loader does some magic here. -- Clemens Lang ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: Creating a Portfile for BirdFont
Thank you for the solution! I have created a new release with the changes you propose. Source package: http://birdfont.org/releases/birdfont-0.18.tar.gz Portfile: http://birdfont.org/Portfile Binary package: http://sourceforge.net/projects/birdfont/files/Birdfont/birdfont-0.18.mpkg.zip/download >Btw, do you have DYLD_LIBRARY_PATH or similar set? I do not have DYLD_LIBRARY_PATH set. It seems to work anyway. /Johan ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: Creating a Portfile for BirdFont
On Mon, Feb 25, 2013 at 04:58:43PM +0100, Johan Mattsson wrote: > Could not open /usr/local/lib/libbirdfont.dylib: Error opening or > reading file (referenced from /opt/local/bin/birdfont) > DEBUG: Marking /opt/local/bin/birdfont as broken > DEBUG: Marking /opt/local/bin/birdfont-export as broken The problem seems to be that while your Portfile builds a library called libbirdfont.dylib, the path the library uses to identify itself (the so-called ID loadcommand) does not correctly contain /opt/local/lib/libbirdfont.dylib, but /usr/local/lib/libbirdfont.dylib. You can check this by using otool -D libbirdfont.dylib and/or otool -L libbirdfont.dylib. (the former gives only the ID line, the latter all load commands, where the ID is the first line). Now when the birdfont and birdfont-export binaries are linked they link against this library, which causes the linker to copy the library's ID load command into the binary, i.e. referencing /usr/local/lib/libbirdfont.dylib. You can verify this using otool -L birdfont. The best fix for this problem would be do modify the build system of birdfont to build the library with the correct path. The easier quickfix would be to use install_name_tool -id on the library and install_name_tool -change on the binaries. See man 1 install_name_tool. > The port seems to work fine despite of this error message. The library > will be loaded from the correct location (/opt/local/lib/). This will only be true until you install a different (possibly incompatible) /usr/local/lib/libbirdfont.dylib. Btw, do you have DYLD_LIBRARY_PATH or similar set? Test using env | grep DYLD. If you do, please note that this isn't required for MacPorts and you shouldn't be doing this. -- Clemens Lang ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: Creating a Portfile for BirdFont
On Feb 25, 2013, at 09:58, Johan Mattsson wrote: > Error: Port birdfont is still broken after rebuiling it more than 3 times. > This seems to happen because gcc for some reason links the executable > to /usr/local/lib/libbirdfont.dylib instead of > /opt/local/lib/libbirdfont.dylib. > The library is in the build directory during the linking step and i > link it with this command: > > gcc build/birdfont/*.o ./build/bin/libbirdfont.dylib ... -o > ./build/bin/birdfont > > The port seems to work fine despite of this error message. The library > will be loaded from the correct location (/opt/local/lib/). Maybe some > one here knows how to make the package pass the test. Having files in /usr/local will cause this problem, and others; that's why we don't support that. Move /usr/local aside and clean and rebuild the affected port. https://trac.macports.org/wiki/FAQ#usrlocal ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: Creating a Portfile for BirdFont
On Feb 25, 2013, at 10:58 AM, Johan Mattsson wrote: > I have created a new portfile for BirdFont (http://birdfont.org). The > package works but it does not pass all tests. This is more of a development-related question; please repost it to macports-dev. vq ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users