Building the LightZone source requires (at least) following packages:
- ant version 1.9.8 or later to support nativeheaderdir parameter
- fakeroot for linux package creation
- g++
- gcc version 4.4 or later
- git
- javahelp2 for jhindexer
- libglib2.0-dev
- liblcms2-dev
- liblensfun-dev version 0.3.2
- libjpeg-dev or libjpeg-turbo-dev
- libraw-dev
- libtiff
- libxml2-utils for xmllint
- make
- openjdk-17-jdk or later
- pkg-config
- rsync
See also Packaging on Debian or Ubuntu below.
Install required packages:
sudo apt-get install debhelper devscripts build-essential ant git-core javahelp2 default-jdk default-jre-headless libglib2.0-dev libjiconfont-google-material-design-icons-java liblcms2-dev liblensfun-dev libjpeg-dev libraw-dev libtiff-dev libx11-dev libxml2-utils pkg-config rsync
Note: gcc, g++, libc6-dev and make shall be installed with the build-essential.
Before start the build, you have to set JAVA_HOME
environment variable, e.g.
export JAVA_HOME=/usr/lib/jvm/default-java
Install required packages:
sudo zypper install ant gcc gcc-c++ make
git javahelp2 liblcms2-devel lensfun-devel libjpeg8-devel libraw-devel libtiff-devel libxml2-utils rsync libX11-devel java-11-openjdk-devel pkg-config
Set your JAVA_HOME
variable to point to installed JDK, e.g.
export JAVA_HOME=/usr/lib64/jvm/java
To start the build:
ant -f linux/build.xml
Note: If the build failed with a message:
"/usr/share/ant/bin/antRun": java.io.IOException: error=2, No such file or directory
manually download Apache Ant, unpack it somewhere (e.g. to your home directory) and append it to the path:
export PATH=/home/yourusername/apache-ant-1.10.5/bin/:$PATH
If you want to build LightZone without internet connection, you need to download
the dependency files into the directory lightcrafts/lib
, then:
ant -f linux/build.xml -Dno-ivy=true -Dno-submodule=true
Alternatively, if you cannot use ivy
but you can use git submodule:
ant -f linux/build.xml -Dno-ivy=true -Dno-submodule=false
To check if it works fine before installing:
ant -f linux/build.xml run
You need to place an original source tarball in parent directory. For instance, if you want to build v4.2.4 in /tmp directory,
cd /tmp
curl -L https://github.com/ktgw0316/LightZone/tarball/4.2.4 > lightzone_4.2.4.orig.tar.gz
tar xf lightzone_4.2.4.orig.tar.gz -C lightzone --strip-components=1
mkdir lightzone
cd lightzone
(If you want to build a package including your modification, you need to create its source tarball by yourself and place the tarball in the parent directory of the source code.)
If you are on Debian >= 12 or Ubuntu >= 22.10, you need to do:
cp debian/lightzone-Debian_12.dsc debian/lightzone.dsc
cp debian/patches/series-Debian_12 debian/patches/series
otherwise:
cp debian/lightzone-Debian_11.dsc debian/lightzone.dsc
Then
debuild -uc -us
will create lightzone-*.deb package in the parent directory, To install the package:
sudo dpkg -i ../lightzone_*.deb
If you already have a .src.rpm for other distro, you can create .rpm for your distro from the .src.rpm by yourself.
First of all, you need to install rpm-build using package manager of your distro.
Then extract the contents of the .src.rpm, and copy its source archive to SOURCES directory:
rpm2cpio lightzone-*.src.rpm | cpio -idmv --no-absolute-filenames
cp lightzone-*.tar.xz ~/rpmbuild/SOURCES/
Then build an .rpm package using .spec file:
rpmbuild -b lightzone.spec
If package list for unsatisfied dependency is shown, install the packages via apt-get,
then execute the rpmbuild command again. Your .rpm package will be created in
~/rpmbuild/RPMS/i386/
or ~/rpmbuild/RPMS/x86_64/
. Install it with
rpm -ivh ~/rpmbuild/RPMS/x86_64/lightzone-*.rpm
Install LightZone in a local overlay. First you need app-portage/layman
:
USE=git emerge app-portage/layman
There is a howto for the local overlay on Gentoo Wiki: Overlay/Local overlay
In the local overlay use the portage groups:
mkdir media-gfx/lightroom
Put linux/lightzone_9999.ebuild
in the local overlay.
If you need to build specific version, replace the 9999
in the filename with the version number such as 4.2.4
.
Move into the new directory media-gfx/lightroom
and do:
repoman manifest
popd
Now you are ready to
emerge media-gfx/lightzone
In my case I had to keyword lightzone....
There is a SlackBuild script with a patch to build a Slackware package on Gist. You can use it like following:
sbopkg -i zulu-openjdk17
sbopkg -i apache-ant
sbopkg -i apache-ivy
wget https://github.com/ktgw0316/LightZone/archive/refs/tags/4.2.4.tar.gz
wget https://gist.github.com/ktgw0316/1d178a800377b247a531a4b4e59bfac9/ivy.patch
wget https://gist.github.com/ktgw0316/1d178a800377b247a531a4b4e59bfac9/lightzone.SlackBuild
chmod +x ./lightzone.SlackBuild
su -c ./lightzone.SlackBuild
su -c "installpkg /tmp/lightzone-4.2.4-1_SBo.tgz"
There are build scripts in freebsd-ports/graphics/lightzone/
directory.