diff -Nru lightzone-4.1.8/debian/changelog lightzone-4.1.8/debian/changelog --- lightzone-4.1.8/debian/changelog 2017-12-24 12:15:11.000000000 +0000 +++ lightzone-4.1.8/debian/changelog 2018-01-10 07:10:50.000000000 +0000 @@ -1,3 +1,12 @@ +lightzone (4.1.8-2dhor~xenial) xenial; urgency=medium + + * Fix: Keep color profiles, fix #215 + * Fix: Linux - Fix #212 missing package + * Fix: Avoid division by zero in CropBounds scaling + * Fix error: unmappable character for encoding ASCII + + -- Dariusz Duma Wed, 10 Jan 2018 08:09:00 +0100 + lightzone (4.1.8-1dhor~xenial) xenial; urgency=medium * File is lost if renaming failed diff -Nru lightzone-4.1.8/debian/patches/fixes lightzone-4.1.8/debian/patches/fixes --- lightzone-4.1.8/debian/patches/fixes 1970-01-01 00:00:00.000000000 +0000 +++ lightzone-4.1.8/debian/patches/fixes 2018-01-10 07:11:22.000000000 +0000 @@ -0,0 +1,212 @@ +--- lightzone-4.1.8.orig/lightcrafts/mk/platform.mk ++++ lightzone-4.1.8/lightcrafts/mk/platform.mk +@@ -13,7 +13,14 @@ ifndef JAVA_HOME + $(error "JAVA_HOME" must be set) + endif + +-PROCESSOR:= $(shell uname -m) ++## ++# Target architecture ++## ++ifdef TARGET ++ PROCESSOR:= $(TARGET) ++else ++ PROCESSOR:= $(shell uname -m) ++endif + ifeq ($(PROCESSOR),i486) + PROCESSOR:= i386 + else ifeq ($(PROCESSOR),i586) +--- lightzone-4.1.8.orig/lightcrafts/src/com/lightcrafts/model/CropBounds.java ++++ lightzone-4.1.8/lightcrafts/src/com/lightcrafts/model/CropBounds.java +@@ -306,6 +306,10 @@ public class CropBounds { + } + + public Dimension getDimensionToFit(Dimension bounds) { ++ if (width <= 0 || height <= 0) { ++ return new Dimension(bounds.width, bounds.height); ++ } ++ + // Fit longer sides + double scale = (width > height) + ? bounds.width / width +--- lightzone-4.1.8.orig/lightcrafts/test/src/com/lightcrafts/model/CropBoundsTest.java ++++ lightzone-4.1.8/lightcrafts/test/src/com/lightcrafts/model/CropBoundsTest.java +@@ -52,5 +52,9 @@ public class CropBoundsTest { + new Point2D.Double(2554.8590, 1728.0603), + 3455.5752, 3455.5752, 0); + assertEquals(D3455x3455, crop.getDimensionToFit(D3455x3455)); ++ ++ crop = new CropBounds( ++ new Point2D.Double(0, 0), 0, 0, 0); ++ assertEquals(D3455x3455, crop.getDimensionToFit(D3455x3455)); + } + } +\ No newline at end of file +--- lightzone-4.1.8.orig/linux/BUILD-Linux.md ++++ lightzone-4.1.8/linux/BUILD-Linux.md +@@ -22,7 +22,7 @@ _For Debian (>= squeeze, i386/amd64) and + + Install required packages: + +- sudo apt-get install debhelper devscripts build-essential ant autoconf git-core javahelp2 default-jdk default-jre-headless rsync libjpeg-turbo8-dev libtiff5-dev libx11-dev libxml2-utils ++ sudo apt-get install debhelper devscripts build-essential ant autoconf git-core javahelp2 default-jdk default-jre-headless rsync libjpeg-turbo8-dev liblcms2-dev libtiff5-dev libx11-dev libxml2-utils + + _(Note: gcc, g++, libc6-dev and make shall be installed with the build-essential.)_ + +--- lightzone-4.1.8.orig/linux/lightzone.spec ++++ lightzone-4.1.8/linux/lightzone.spec +@@ -23,6 +23,7 @@ Source: %{name}-%{version}.tar.bz2 + %define libjpeg_devel libjpeg-turbo-devel + %define libX11_devel libX11-devel + %define pkg_config pkgconfig ++%define xmllint libxml2 + %define debug_package %{nil} + %endif + +@@ -36,6 +37,7 @@ Source: %{name}-%{version}.tar.bz2 + %define libjpeg_devel libjpeg-turbo-devel + %define libX11_devel libX11-devel + %define pkg_config pkgconfig ++%define xmllint libxml2 + %define debug_package %{nil} + %endif + +@@ -45,6 +47,7 @@ Source: %{name}-%{version}.tar.bz2 + %define libjpeg_devel libjpeg8-devel + %define libX11_devel xorg-x11-libX11-devel + %define pkg_config pkg-config ++%define xmllint libxml2 + BuildRequires: update-desktop-files + %endif + +@@ -59,6 +62,7 @@ BuildRequires: update-desktop-files + %define lcms2_devel liblcms2-devel + %define libjpeg_devel libjpeg8-devel + %define pkg_config pkg-config ++%define xmllint libxml2-tools + %endif + + %if 0%{?mdkversion} || 0%{?pclinuxos} +@@ -67,6 +71,7 @@ BuildRequires: update-desktop-files + %define libjpeg_devel libjpeg8-devel + %define libX11_devel libX11-devel + %define pkg_config pkg-config ++%define xmllint libxml2-utils + %endif + + BuildRequires: java-%{java_version}-devel, %{libX11_devel}, ant, autoconf, gcc, gcc-c++, make, git, javahelp2, %{lcms2_devel}, %{libjpeg_devel}, libtiff-devel, %{pkg_config}, rsync +@@ -74,7 +79,7 @@ BuildRequires: java-%{java_version}-deve + BuildRequires: java-rpmbuild, libgomp-devel + %endif + +-Requires: java-%{java_version}, javahelp2, lcms2, libxml2-utils ++Requires: java-%{java_version}, javahelp2, lcms2, %{xmllint} + %if 0%{?suse_version} >= 1320 + Requires: xerces-j2-xml-apis + %else +--- lightzone-4.1.8.orig/linux/src/com/lightcrafts/platform/linux/LinuxPlatform.java ++++ lightzone-4.1.8/linux/src/com/lightcrafts/platform/linux/LinuxPlatform.java +@@ -120,14 +120,12 @@ public class LinuxPlatform extends Platf + return LinuxKeyUtil.isKeyPressed(keyCode); + } + +- private static Collection getColorProfiles() { +- if (Profiles != null) { +- return Profiles; ++ private static synchronized Collection getColorProfiles() { ++ if (Profiles == null) { ++ Profiles = new HashSet(); ++ Profiles.addAll(getColorProfiles(SystemProfileDir)); ++ Profiles.addAll(getColorProfiles(UserProfileDir)); + } +- Profiles = new HashSet(); +- Profiles.addAll(getColorProfiles(SystemProfileDir)); +- Profiles.addAll(getColorProfiles(UserProfileDir)); +- + return Profiles; + } + +--- lightzone-4.1.8.orig/windows/BUILD-Windows-msys2.md ++++ lightzone-4.1.8/windows/BUILD-Windows-msys2.md +@@ -58,8 +58,8 @@ Do NOT set C_INCLUDE_PATH=/usr/include f + + Before starting your first build, you have to copy HtmlHelp.lib to mingw library path: + +- cp ${MSSDK_HOME}/Lib/win8/um/x86/Htmlhelp.Lib /mingw32/lib/libhtmlhelp.a +- cp ${MSSDK_HOME}/Lib/win8/um/x64/Htmlhelp.Lib /mingw64/lib/libhtmlhelp.a ++ cp "${MSSDK_HOME}/Lib/10.0.14393.0/um/x86/Htmlhelp.Lib" /mingw32/lib/libhtmlhelp.a ++ cp "${MSSDK_HOME}/Lib/10.0.14393.0/um/x64/Htmlhelp.Lib" /mingw64/lib/libhtmlhelp.a + + Checkout your project with Git. If you have problems with line endings in build (the \r stuff), do + following: +@@ -72,6 +72,10 @@ To start the build: + cd windows + ant build-installer + ++If you want to build a 32-bit binary on 64-bit machine, specify TARGET variable: ++ ++ TARGET=i386 ant build-installer ++ + ### Known build issues + - In LightZone there are now no version information. There was a problem with rc.exe from MSSDK + failing, windres can be used to compile it. There is a bug in windres that makes it fail on +--- lightzone-4.1.8.orig/windows/build.xml ++++ lightzone-4.1.8/windows/build.xml +@@ -11,8 +11,18 @@ + outputproperty="processor"> + + ++ + +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +--- lightzone-4.1.8.orig/windows/src/com/lightcrafts/platform/windows/WindowsPlatform.java ++++ lightzone-4.1.8/windows/src/com/lightcrafts/platform/windows/WindowsPlatform.java +@@ -257,18 +257,16 @@ public final class WindowsPlatform exten + ////////// private //////////////////////////////////////////////////////// + + private static synchronized Collection getColorProfiles() { +- if ( m_profiles != null ) +- return m_profiles; +- m_profiles = new ArrayList(); ++ if (m_profiles == null) { ++ String windir = System.getenv("WINDIR"); ++ if (windir == null) ++ windir = "C:\\WINDOWS"; + +- String windir = System.getenv( "WINDIR" ); +- if ( windir == null ) +- windir = "C:\\WINDOWS"; +- +- final File profileDir = new File( +- windir + "\\system32\\spool\\drivers\\color" +- ); +- return getColorProfiles(profileDir); ++ final File profileDir = new File( ++ windir + "\\system32\\spool\\drivers\\color"); ++ m_profiles = getColorProfiles(profileDir); ++ } ++ return m_profiles; + } + + /** +@@ -305,6 +303,6 @@ public final class WindowsPlatform exten + * The ICC profiles from + * $WINDIR\system32\spool\drivers\color. + */ +- private static List m_profiles; ++ private static Collection m_profiles; + } + /* vim:set et sw=4 ts=4: */ diff -Nru lightzone-4.1.8/debian/patches/series lightzone-4.1.8/debian/patches/series --- lightzone-4.1.8/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ lightzone-4.1.8/debian/patches/series 2018-01-10 07:11:09.000000000 +0000 @@ -0,0 +1 @@ +fixes