mkae / macstrop

RJVB's repository of alternative macports, with ports missing from or overriding those in the standard collection.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is my "local port repository" for use with MacPorts, containing among others the first co-installable Qt4 and Qt5 ports and a collection of other ports not (yet) in or overriding those from the main repository.
That includes ports for a growing selection of KF5 ("KDE5") applications and the KF5 Frameworks (see below).

Instructions to use are given below. Make sure to read everything, especially the note about PortGroups.

To "install", clone the repository to a location of choice. My original is in the root of the MacPorts prefix: /opt/local/site-ports; let's say you want to do the same:

%> sudo -u macports git clone --depth=1 --no-single-branch http://github.com/RJVB/macstrop.git /opt/local/site-ports

(the --depth and --no-single-branch options are optional of course.)

Then, edit ${prefix}/etc/macports/sources.conf (${prefix} is where MacPorts is installed; by default it's /opt/local). Towards the end of the file, add a line *above* the line that has [default] at the end:

file:///opt/local/site-ports

and save the file. If you do not want this repository to be updated automatically whenever you do port selfupdate or port sync, you'll want to add [nosync] at the end of the line you added.

Now, do

%> (cd /opt/local/site-ports ; portindex)

and the new ports will be available.

Ports that are in my repository but are also in the default repository will override those in the default repository (and all other repositories listed after site-ports in sources.conf). If you use the aforementioned [nosync] option, you'll have to update the tree yourself. In that case you may have to do `portindex -f` at least periodically, to account for changes like removed variants or subports.

An important note: this repository also contains PortGroup files. These files that contain definitions that are used by multiple ports that share certain properties (form a group, say all ports that build using CMake, or that use Qt or KDE libraries). PortGroups are like C header files, or Python/Perl/Tcl packages, included via a specific command in a port's "Portfile". Note that PortGroups themselves can include other PortGroups in exactly the same way! An example: the command `PortGroup kf5 1.1` will include the file kf5-1.1.tcl, which will then include other PortGroup files like qt5-1.0.tcl, qt5-kde-1.0.tcl and cmake-1.1.tcl. Each file will be included from either the same _resources directory, or else from the default _resources directory.
These PortGroups apply only to the ports in the local repository. This may lead to surprising behaviour and errors. For instance, if you install my port:qt5-kde or port:qt5-kde-devel, every port (including those in the official port tree) that requires Qt5 will need to use the corresponding Qt5 PortGroup (the qt5-*1.0.tcl files and probably qmake5-1.0.tcl), esp. if you plan to build them from source.
You will thus have to copy the corresponding files from the /opt/local/site-ports/_resources directory to the same directory in the default port tree (defined in sources.conf). You will have to do this again after each selfupdate.
Sadly there isn't much that can be done at the moment to make this more convenient. The best rule of thumb is to check for each port you install from my tree what PortGroups it uses (fgrep PortGroup `port file foo`), identify the corresponding files and files those include, check which ones are present in site-ports/_resources, and copy those files to the default _resources directory.
UPDATE: I am now providing a script which you can install in git's hooks directory, and which will copy all new files from the local _resource directory into the _resources directory (or directories of choice). It comes preconfigured with the location for the rsync-based standard ports. You will still need to do the initial install manually, but afterwards new versions should be installed (copied) automatically by the script.
In order to install this script do:

%> ln -s ../../Hooks/post-checkout /opt/local/site-ports/.git/hooks/post-checkout
%> ln -s ../../Hooks/post-checkout /opt/local/site-ports/.git/hooks/post-merge
%> ln -s ../../Hooks/post-checkout /opt/local/site-ports/.git/hooks/post-rewrite

A note about upgrades: I am not very religous at all in bumping the port revision variable each time I change something minor. That means that even after running portindex those ports won't be updated automatically (marked as outdated). It is thus useful to know that any port can be reinstalled ("upgraded") with the command
`port -ns upgrade --force foo`
(the -n is strongly advisable here; without it all ports on which `foo` depends would be reinstalled).

A note about the KF5 ports:
These are designed to install much like the KDE4 ports from the official ports tree: using shared resources and dependencies.
For KDE4 this was the "linuxy but logical" way to do things, and as far as I'm concerned it still is for KF5 software in the context of a package management system like MacPorts. Deploying them as fully standalone "app bundles" is nice but inappropriate for MacPorts because it leads to duplicate installation of dependencies and will inevitably lead to interoperability issues because crucial resources are not installed to the proper central location(s).
This "linuxy" approach does require the use of a patched Qt5, which is provided by port:qt5-kde (or port:qt5-kde-devel) in this
repository.
The recommended way of installing KF5 ports is to install port:qt5-kde first (and follow the above instructions about PortGroups!).
It should also be possible to specify the +qt5kde variant in the install command (e.g.

%> port install kf5-kate +qt5kde

I haven't tested this in a clean install; it is NOT necessary to specify the variant once port:qt5-kde is installed.

Legal disclaimer (FWIW):
Many of the files in this repositories are more or less verbatim copies of files available elsewhere. I have neither removed nor added copyright or license information/claims. The commit history will make it clear which portfiles and patches have been authored by me. Those are explicitly put in the public domain, for use in any way seen fit, including incorporation (of code in the patch files) in commercially available software (like Qt) as long as a reference is made to my original authorship. Contact me in case of doubt or necessity.

About

RJVB's repository of alternative macports, with ports missing from or overriding those in the standard collection.


Languages

Language:Tcl 94.9%Language:Shell 4.1%Language:QMake 0.6%Language:C++ 0.3%Language:CMake 0.1%Language:Makefile 0.0%