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.
/grandpa
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
PORTVERSION= ??
DISTVERSIONPREFIX= v
PORTREVISION= ??
CATEGORIES= audio
MAINTAINER= thinking.about@creating.port
COMMENT= Free Piano Tuning software
WWW= https://gitlab.com/tp3/Entropy-Piano-Tuner
LICENSE= GPLv3
LICENSE_COMB= ???
LICENSE_FILE_GPLv3= ${WRKSRC}/gpl_v3.md
LIB_DEPENDS= libfftw3.so:math/fftw3 libuv.so:devel/libuv
USES= compiler:c++14 gl gnome pkgconfig qmake qt:6 tar:bzip2 xorg
USE_QT= buildtools:build core gui opengl qmake:build multimedia network svg widgets
USE_GL= gl glut
USE_GITHUB= yes
GH_ACCOUNT= ??????
QMAKE_ARGS+= PREFIXSHORTCUT=${PREFIX}
OPTIONS_DEFINE= ALSA JACK OSS PORTAUDIO
OPTIONS_DEFAULT= JACK OSS[/INDENT][/INDENT]
ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib
ALSA_QMAKE_ON= CONFIG+=acs_alsa
OSS_QMAKE_ON= CONFIG+=acs_oss
JACK_LIB_DEPENDS= libjack.so:audio/jack
JACK_QMAKE_ON= CONFIG+=acs_jack
PORTAUDIO_LIB_DEPENDS= libportaudio.so:audio/portaudio
PORTAUDIO_QMAKE_ON= CONFIG+=acs_portaudio
.include <bsd.port.mk>
/grandpa
Last edited: