/201802 /Preparation |
FreBSD Ports workshops
Contents
Documentation
FreeBSD Porter's Handbook, especially:
FreeBSD Ports: New Contributors 101 (by Kubilay Kocak) (archive.org alternative)
Submitting patches and new ports to FreeBSD Bugzilla:
Outlines of suggested workflows
General instructions on how you can start hacking on the FreeBSD Ports.
Creating a new port
- Prepare your environment.
- Create a new directory for your new port somewhere. For example in your home directory.
mkdir ~/newport
Go to the newport directory and create a Makefile there.
cd ~/newport touch Makefile
- Create a new directory for your new port somewhere. For example in your home directory.
See FreeBSD Porter's Handbook: Chapter 3. Quick Porting and try to work on your Makefile as much as you can.
Let's try to build and install the new port. Normally, it is done by running make install inside the port's directory. For development purposes it might be easier to run every command involved in the process manually.
- Run
make fetch
Troubleshooting:You might need to become a root to do this. By default, the archives with source code are downloaded to /usr/ports/distfiles/, which can only be modified by root. Solution: sudo make fetch.
If you've not created a distinfo file it might be a good moment to do it. Otherwise, make fetch will likely fail. See FreeBSD Porter's Handbook: 3.3. Creating the Checksum File.
- Run
make extract
- Run
make build
Make sure that at this point you've already created a pkg-plist file or defined a PLIST_FILES variable in Makefile. See FreeBSD Porter's Handbook: 3.2. Writing the Description Files.
- Run
make install
You might need to become a root to do this. Solution: sudo make install.
- Run
- At this point you've managed to build and install that new port on the system. It is time to clean up the files you've created and do some testing.
- Run
portlint
Fix everything this tool complains about.Install portlint first with pkg install portlint.
- Run
port test
Fix everything this tool complains about.Install port first with pkg install porttools.
- Run
Updating a port
TODO
Simple tasks and issues for first timers
Make sure MASTER_SITES aliases are being used instead of hard-coded URLs.
Make sure that optimized CFLAGS and CPPFLAGS use the same variable irregardless of a port.
Ideas for (potentially) fun ports contributions
New ports |
||
Open-source markdown editor built for desktop. |
|
|
Tactical space combat game. |
|
|
Peer-to-peer Web browser. |
|
|
IRC client for desktop environments. |
|
|
Ruby script which allows to pipe data easily through gnuplot and create plots quickly, which can be saved in PostScript, PDF, PNG or EMF files. |
|
|
Screen capture using pygtk, inspired by scrot. |
|
|
Command-line benchmarking tool. |
|
|
Cross-platform POSIX shell feature detection and language extension library. |
|
|
Task-based command-line shell and scripting language built on the .NET Framework to help IT professionals control and automate the administration of MS-Windows and (now) other platforms. |
|
|
Feed input to a command, displaying a progress bar. |
|
|
Tensors and dynamic neural networks in Python with strong GPU acceleration. |
The /201802 workshop participants started to work on this port but it turned out to be a little bit too big to fit in one workshop. |
|
Although CUDA is not supported on FreeBSD it might be nice to have at least some of the PyTorch functionalities available on FreeBSD. |
||
Extremely small and simple HTTP GET-only web server. It only serves static pages on a single host. |
The participants of the /201802 workshop have managed to successfully port this software. See the port submission on FreeBSD Bugzilla. |
|
Markdown pastebin from command line. |
|
|
Static site generator in C. |
|
|
Interactive shellcoding environment to easily craft shellcodes. |
|
|
Corrective Bash syntax highlighter. |
|
|
Suckless status monitor for window managers that use WM_NAME (e.g. dwm) or stdin to fill the status bar. |
|
|
Simple terminal from https://suckless.org. |
|
|
There already exists a port of st (x11/sterm) but its version is 0.7, which is the latest release. It'd be nice to have a port of the bleeding-edge version of st. |
||
When x11/sterm-devel is ready then the next goal might adding some of the community patches as port options. For example: scrollback, right click to plumb. |
||
Command line interface for interacting with Mastodon instances. |
|
|
Command line tool that allows querying several package lists at once written in Perl. |
|
|
Integrate Vim editing capabilities into any text buffer |
|
|
Benchmark utility which takes a testcase and runs it from 1 through to n parallel copies to see if the testcase. |
|
|
There is a NetBSD port, which might be helpful. Ping MateuszPiotrowski for details. |
||
MateuszGuzik is using it for benchmarking. He might have some patches laying aroud. |
||
Command prefixing for continuous workflow using a single tool. |
The participants of the /201802 workshop have managed to successfully port this software. See the port submission on FreeBSD Bugzilla. |
|
New features and modifications |
||
Dictionary lookup program. |
|
|
Add a toki pona dictionary to the existing german/ding port. |
||
The license set in the german/ding Makefile is not 100% correct. Fix it. |
||
It might be fun to make port options from some of the patches: noborder, fakefullscreen. |
|
|
The task is to get interesting commits from the jcs's fork of intel-backlight, send a PR with to upstream and then submit an update to the intel-backlight port itself. |
|
|
Jonathon Fowler's port of the 3D Realms game "Shadow Warrior". |
As of the /201802 workshop, the game does not start. It is probably related to the fact that you need to obtain a couple of extra files to run this game (namely, sw.grp and sw.rts) |