Edit: After submitting I corrected some errors in the thread and added my learning here at the top.
Learnings added after port was submitted:
- Porters handbook is a great starting point but when stuck open bsd.port.mk
- Look for and use test options from bsd.port.mk. It's better to do make fetch-list than to do make fetch
- Remember to update distfiles and pkg-plist when needed
- Don't let the freebsd installer add /usr/ports - you will need to do this with git
- The people on this forum are great. Thanks to everyone for letting me have fun trying to create a port
Original thread starts here:
Source from GitLab that is free with GPL - https://gitlab.com/tp3/Entropy-Piano-Tuner.
About the original GitLab source code.
Learnings added after port was submitted:
- Porters handbook is a great starting point but when stuck open bsd.port.mk
- Look for and use test options from bsd.port.mk. It's better to do make fetch-list than to do make fetch
- Remember to update distfiles and pkg-plist when needed
- Don't let the freebsd installer add /usr/ports - you will need to do this with git
- The people on this forum are great. Thanks to everyone for letting me have fun trying to create a port
Original thread starts here:
Source from GitLab that is free with GPL - https://gitlab.com/tp3/Entropy-Piano-Tuner.
About the original GitLab source code.
- The source contains code for multiple target platforms
- There's code to build two libraries that are already in base system
- To compile some changes are necessary to some config files
- It's uses Qt6, xorg, qmake, mate, gl
- Compiles with QtCreator on latest GhostBSD (FreeBSD 14.3) or from shell with qmake and make
- Because of the "inside" libraries some LD_LIBRARY_PATHS needs to be added to run, ie startscript required
Having never done a port for FreeBSD before I am thinking this could be as easy as creating patches with diff between GitHub source and the changes required to make it run.
What is best practice?
Is it possible to make fetch the original GitHub repo as a tarball into distfiles (Without a GitLab account?)
How will the patches get to the ports - are there PATCH_SITES (bsd.port.mk) available?
Could a beginning Makefile look something like this? (using /usr/ports/audio/fmit as example)
Makefile:
PORTNAME= entropypianotuner[/INDENT][/INDENT][/INDENT]
[INDENT=4][INDENT=4]PORTVERSION= ??[/INDENT][/INDENT]
[INDENT=4][INDENT=4]DISTVERSIONPREFIX= v[/INDENT][/INDENT]
[INDENT=4][INDENT=4]PORTREVISION= ??[/INDENT][/INDENT]
[INDENT=4][INDENT=4]CATEGORIES= audio[/INDENT][/INDENT]
[INDENT=4][INDENT=4][/INDENT][/INDENT]
[INDENT=4][INDENT=4]MAINTAINER= thinking.about@creating.port[/INDENT][/INDENT]
[INDENT=4][INDENT=4]COMMENT= Free Piano Tuning software[/INDENT][/INDENT]
[INDENT=4][INDENT=4]WWW= https://gitlab.com/tp3/Entropy-Piano-Tuner[/INDENT][/INDENT]
[INDENT=4][INDENT=4][/INDENT][/INDENT]
[INDENT=4][INDENT=4]LICENSE= GPLv3[/INDENT][/INDENT]
[INDENT=4][INDENT=4]LICENSE_COMB= ???[/INDENT][/INDENT]
[INDENT=4][INDENT=4]LICENSE_FILE_GPLv3= ${WRKSRC}/gpl_v3.md[/INDENT][/INDENT]
[INDENT=4][INDENT=4][/INDENT][/INDENT]
[INDENT=4][INDENT=4]LIB_DEPENDS= libfftw3.so:math/fftw3 libuv.so:devel/libuv[/INDENT][/INDENT]
[INDENT=4][INDENT=4][/INDENT][/INDENT]
[INDENT=4][INDENT=4]USES= compiler:c++14 gl gnome pkgconfig qmake qt:6 tar:bzip2 xorg[/INDENT][/INDENT]
[INDENT=4][INDENT=4][/INDENT][/INDENT]
[INDENT=4][INDENT=4]USE_QT= buildtools:build core gui opengl qmake:build multimedia network svg widgets[/INDENT][/INDENT]
[INDENT=4][INDENT=4]USE_GL= gl glut[/INDENT][/INDENT]
[INDENT=4][INDENT=4][/INDENT][/INDENT]
[INDENT=4][INDENT=4]USE_GITHUB= yes[/INDENT][/INDENT]
[INDENT=4][INDENT=4]GH_ACCOUNT= ??????[/INDENT][/INDENT]
[INDENT=4][INDENT=4][/INDENT][/INDENT]
[INDENT=4][INDENT=4]QMAKE_ARGS+= PREFIXSHORTCUT=${PREFIX}[/INDENT][/INDENT]
[INDENT=4][INDENT=4][/INDENT][/INDENT]
[INDENT=4][INDENT=4]OPTIONS_DEFINE= ALSA JACK OSS PORTAUDIO[/INDENT][/INDENT]
[INDENT=4][INDENT=4]OPTIONS_DEFAULT= JACK OSS[/INDENT][/INDENT]
[INDENT=4][INDENT=4][/INDENT][/INDENT]
[INDENT=4][INDENT=4]ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib[/INDENT][/INDENT]
[INDENT=4][INDENT=4]ALSA_QMAKE_ON= CONFIG+=acs_alsa[/INDENT][/INDENT]
[INDENT=4][INDENT=4][/INDENT][/INDENT]
[INDENT=4][INDENT=4]OSS_QMAKE_ON= CONFIG+=acs_oss[/INDENT][/INDENT]
[INDENT=4][INDENT=4][/INDENT][/INDENT]
[INDENT=4][INDENT=4]JACK_LIB_DEPENDS= libjack.so:audio/jack[/INDENT][/INDENT]
[INDENT=4][INDENT=4]JACK_QMAKE_ON= CONFIG+=acs_jack[/INDENT][/INDENT]
[INDENT=4][INDENT=4][/INDENT][/INDENT]
[INDENT=4][INDENT=4]PORTAUDIO_LIB_DEPENDS= libportaudio.so:audio/portaudio[/INDENT][/INDENT]
[INDENT=4][INDENT=4]PORTAUDIO_QMAKE_ON= CONFIG+=acs_portaudio[/INDENT][/INDENT]
[INDENT=4][INDENT=4][/INDENT][/INDENT]
[INDENT=4][INDENT=4].include <bsd.port.mk>
/grandpa
Last edited: