Skip to content

Commit

Permalink
refocus-it-2.1 (2025feb20)
Browse files Browse the repository at this point in the history
This tag-point still builds and install okay for gimp2.
This is the last update before making a gimp3 version.
  • Loading branch information
JoesCat committed Feb 21, 2025
1 parent 8c974d4 commit d3b00cd
Show file tree
Hide file tree
Showing 14 changed files with 318 additions and 903 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CI
on: [push,pull_request]

jobs:
linux:
runs-on: ubuntu-latest
strategy:
matrix:
choiceL: [--disable-silent-rules, --enable-silent-rules, --enable-debug]
steps:
- uses: actions/checkout@v4
- name: Create configure
run: |
sudo apt-get update -y
sudo apt-get install autoconf automake libtool gcc gimp libgimp2.0-dev
autoreconf -i
automake
- name: Choose configure
run: ./configure ${{ matrix.choiceL }}
- name: Make gimp-refocus-it plug-in
run: make
- name: Test make strip
run: make strip
- name: Test make install GIMP shared plug-in
if: matrix.choiceL == '--disable-silent-rules'
run: |
sudo make install
sudo make uninstall
win:
runs-on: windows-latest
strategy:
matrix:
include: [
{msystem: MINGW32, toolchain: mingw-w64-i686, version: x32 },
{msystem: MINGW64, toolchain: mingw-w64-x86_64, version: x64 },
{msystem: UCRT64, toolchain: mingw-w64-ucrt-x86_64, version: x64 },
{msystem: CLANG64, toolchain: mingw-w64-clang-x86_64, version: x64 },
]
name: ${{ matrix.msystem }}
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
update: true
install: autotools base-devel git ${{ matrix.toolchain }}-toolchain ${{ matrix.toolchain }}-gimp2
- name: Create configure
run: |
autoreconf -i
automake
- name: run ./configure
run: ./configure
- name: Make gimp-refocus-it plug-in
run: make
7 changes: 6 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
This plug-in and command-line version of refocus-it was written by
This plug-in version of refocus-it was written by
Lukas Kunc <Lukas.Kunc@seznam.cz>.

Some of the code in the plug-in was borrowed from the Gimp Sharpen
plug-in by Michael Sweet and from Gimp Refocus blugin by Ernst Lippe.
This is also GPL2+, and thanks to several other Authors.

2024 bugfixes added to get refocus-it running on gimp 2.10+ by
Jose da Silva

75 changes: 49 additions & 26 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,32 +1,55 @@
2004-06-16 Lukas Kunc <lukas.kunc@seznam.cz>

* Second public release - version 2.0.0 for GIMP 2.0

* cmd-line/: Added command-line version for users not having GIMP
Use refocus-it-cmd --help for more information.

* po/*: Internationalized

2004-06-15 gettextize <bug-gnu-gettext@gnu.org>

* Makefile.am (SUBDIRS): New variable.
(ACLOCAL_AMFLAGS): New variable.
(EXTRA_DIST): Add config.rpath.
* configure.in (AC_OUTPUT): Add po/Makefile.in,
2025-02-20 (2.1) Joe Da Silva <digital@joescat.com>

* Replaced deprecated INTLTOOL with GETTEXT
* Updated configure.ac and Makefile.am from 2.54 to 2.69
* Removed xmalloc code - We should avoid doing exit() here.
* Simplified a lot of code with expectation of upgrading to GIMP3.
* Inline is interesting, but the speed gains in excluding a call
and matching return are neglible. Opted for smaller exe instead.
* Optional float/double simplified to double since GIMP3 uses double.
* Dropped build of cmd-line tools, since GIMP3 will use GTK3.
* GIMP2 plugin binary name simplified to refocus-it
* po/* locale files renamed to use gimp20-refocus-it
* Dropped micro_version value since this is a binary, not a library.
Distros can opt to use the micro_version value for their builds.
* Realigned all code in src/* directory since some code followed
different styles (TABs, spaces, {brackets}. Chose to use a more
compact coding style similar to Fontforge 20120731 which allows
more code to be viewed per display screen.
* Dropped help/ directory, appeared unfinished and preliminary.
* Moved doc/*.pgm to img/ directory since these are useful 16bpp.
* Imported sourceforge information page into README.md and img/*.jpg

NOTE: This is still a GIMP2 binary, and builds okay on gimp-2.10

2004-06-16 (2.0.0) Lukas Kunc <lukas.kunc@seznam.cz>

* Second public release - version 2.0.0 for GIMP 2.0
* cmd-line/: Added command-line version for users not having GIMP
Use refocus-it-cmd --help for more information.
* po/*: Internationalized

2004-06-15 (prerelease) gettextize <bug-gnu-gettext@gnu.org>

* Makefile.am (SUBDIRS): New variable.
(ACLOCAL_AMFLAGS): New variable.
(EXTRA_DIST): Add config.rpath.
* configure.in (AC_OUTPUT): Add po/Makefile.in,

2003-07-19 (1.0.2) Lukas Kunc <lukas.kunc@seznam.cz>

* First public release - version 1.0.2 (on sourceforge).

2003-05-23 Lukas Kunc <lukas.kunc@seznam.cz>

* This is the first public release (0.0.1) of the refocus plug-in.
* This is the first public release (0.0.1) of the refocus plug-in.

2003-05-28 Lukas Kunc <lukas.kunc@seznam.cz>

* Makefile.msc: Makefile for Microsoft Visual C++ added.

* blur.c: Added support for motion and gaussian blur, improved
support for defocus blur.

* main.c: Added support for motion and gaussian blur.
* main.c: Added support for alpha channel.

* weights.c: Make code faster for sparse convolution masks.
* hopfield.c: Make code faster for sparse convolution masks.
* Makefile.msc: Makefile for Microsoft Visual C++ added.
* blur.c: Added support for motion and gaussian blur,
improved support for defocus blur.
* main.c: Added support for motion and gaussian blur.
* main.c: Added support for alpha channel.
* weights.c: Make code faster for sparse convolution masks.
* hopfield.c: Make code faster for sparse convolution masks.
9 changes: 8 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,12 @@ SUBDIRS = po src gimp-plugin

EXTRA_DIST = img/defocus.jpg img/defocus.pgm img/wilber.png \
img/restored1.jpg img/restored2.jpg img/restored3.jpg \
AUTHORS README README.md
img/restored.pgm AUTHORS README README.md
nodist_EXTRA_DATA = .git .github .dep .lib
DISTCHECK_CONFIGURE_FLAGS = --disable-silent-rules --enable-debugtime

DISTCLEANFILES =

strip:
${STRIP} ${builddir}/gimp-plugin/refocus-it

23 changes: 5 additions & 18 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,21 @@ This plug-in has a preview that helps you select the best parameters.

This version of the plug-in needs the Gtk+-2.2.2 libraries or newer.

There is also commdan-line version (refocus-it-cmd) for users which cannot use
GIMP or need batch processing. Type refocus-it-cmd --help for more information.

---
INSTALLATION

If you have GNU environment, use
If you have GNU environment, use:

autoreconf -i
automake
./configure
make
make install
sudo make install

See the file INSTALL for more details how to use configure, or type
For more details how to use configure, type:

./configure --help

If you do not have GNU environment, you can use only the command-line version.
Use makefiles under cmd-version/ directory.
In UNIX environment, use

make -f Makefile.unix

In Microsoft Windows, use

nmake -f Makefile.msc

In other environments use other makefiles (probably self-made).

---
I hope you like the plug-in and the command-line version. If you have any
problems or requests please mail me.
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,14 @@ Notice the benefit of adaptive area smoothing. The noise has almost disapeared f

## News

- 2004-07-20: Version 2.0.0 of refocus-it plugin for GIMP-2.0 released. This version is internationalized and includes a command-line version of refocus-it suitable for processing PNM files in batch mode. The command-line version is also easily portable to non-GNU platforms.

- The version 1.0.2 is the first public release.
- 2.1 (2025feb20) Imported refocus-it from sourceforge to github. Replaced intltool with gettext, upgraded build to autoconf 2.69, removed xmalloc and used standard malloc instead. Removed several extras such as inline and float options in anticipation of building for gimp3 plugin. This still builds for gimp2. If you need cmd-line tools, please revert to using version 2.0.0 which still contains original cmd-line build. Removed micro-version value - this leaves micro open for distros if they need/want it.
- 2.0.0 (2004jul20) refocus-it plugin for GIMP-2.0 released. This version is internationalized and includes a command-line version of refocus-it suitable for processing PNM files in batch mode. The command-line version is also easily portable to non-GNU platforms.
- 1.0.2 (2003jun19) First public release.

## Author

This plug-in was written by Lukas Kunc. Please mail your comments, questions and problems to Lukas.Kunc@seznam.cz
This plug-in was written by Lukas Kunc in 2003..2004.

Note: The Original Web page content, pictures, and files were located here https://refocus-it.sourceforge.net/ for version 2.0.0

Note: The Original Web page content, pictures, and files were located here https://refocus-it.sourceforge.net/
Recent updates and patching by Joe da Silva in 2024..2025.
19 changes: 10 additions & 9 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
dnl Process this file with autoconf to produce a configure script.

# Copyright (C) 2025 by Jose Da Silva

AC_PREREQ(2.69)

dnl Name your plug-in here
m4_define([plugin_name], [refocus-it])

dnl These two define the plug-in version number
m4_define([plugin_major_version], [2])
m4_define([plugin_minor_version], [0])
m4_define([plugin_minor_version], [1])

m4_define([plugin_version], [plugin_major_version.plugin_minor_version])
m4_define([plugin_package_name], [gimp-refocus-it])
Expand Down Expand Up @@ -115,14 +117,6 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [The gettext translation
if test x"${have_gettext}" = xyes; then
AC_DEFINE([HAVE_GETTEXT],1,[Enable use of local languages])
fi
SNIPPET2='
gimplocaledir = $(localedir)
ifeq ($(shell id -u),0)
gimplocaledir = $(LOCALEDIR)
endif
'
AC_SUBST([SNIPPET2])
AM_SUBST_NOTMAKE([SNIPPET2])

AC_CHECK_HEADERS([stdlib.h string.h strings.h])

Expand All @@ -141,8 +135,15 @@ PKG_CHECK_MODULES(GIMP, gimp-2.0 gimpui-2.0)
AC_SUBST(GIMP_CFLAGS)
AC_SUBST(GIMP_LIBS)

# Pass GIMP_LIBDIR to automake for default GIMP plug-ins directory
GIMP_GIMPLIBDIR=`$PKG_CONFIG --variable=gimplibdir gimp-2.0`
# Seems that gimp does not follow libdir of the distro, so just replacing prefix
GIMP_LIBDIR=`$PKG_CONFIG --variable=gimplibdir gimp-2.0`
AC_SUBST(GIMP_LIBDIR)
GIMP_PREFIX=`$PKG_CONFIG --variable=exec_prefix gimp-2.0`
GIMP_RELATIVE=${GIMP_GIMPLIBDIR#$GIMP_PREFIX}
GIMP_BINDIR=\${exec_prefix}"$GIMP_RELATIVE"
AC_SUBST(GIMP_BINDIR)

DATADIR='${datadir}/${PLUGIN_NAME}'

Expand Down
17 changes: 9 additions & 8 deletions gimp-plugin/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@
BUILDDIR = $(top_builddir)/src
SRCDIR = $(top_srcdir)/src

INCLUDES = -I$(top_srcdir)/gimp_plugin -I$(top_srcdir) -I$(SRCDIR)
# The braces around ACLOCAL_FLAGS below instead of parentheses are intentional!
# Otherwise autoreconf misparses the line.
ACLOCAL_AMFLAGS =-I m4 ${ACLOCAL_FLAGS}
AM_CFLAGS = ${CFLAGS} ${CPPFLAGS} ${GIMP_CFLAGS} ${GTK_CFLAGS}
AM_CPPFLAGS = -I$(top_srcdir)/gimp_plugin -I$(top_srcdir) -I$(SRCDIR)

DEFS = -DLOCALEDIR=\"$(LOCALEDIR)\" \
-DDATADIR=\""$(DATADIR)"\" \
@DEFS@

AM_CPPFLAGS = @GIMP_CFLAGS@

## This is the GIMP plug-in
bin_PROGRAMS = gimp_plugin-refocus-it
bindir = $(GIMP_LIBDIR)/plug-ins
gimp_plugin_refocus_it_SOURCES = main-gimp.c
gimp_plugin_refocus_it_LDADD = $(BUILDDIR)/librefocus-it.a \
@GIMP_LIBS@ -lm
bin_PROGRAMS = refocus-it
bindir = $(GIMP_BINDIR)/plug-ins/refocus-it
refocus_it_SOURCES = main-gimp.c
refocus_it_LDADD = $(BUILDDIR)/librefocus-it.a ${GIMP_LIBS} -lm
14 changes: 6 additions & 8 deletions po/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
LANGUAGES = cs
PO_FILES = cs.po
LANGUAGES = cs pt
PO_FILES = cs.po pt.po

# Information to help translators
# To create a new pot file, you need to cd into this po directory first:
Expand All @@ -8,8 +8,6 @@ PO_FILES = cs.po
# To update existing po files you need to cd into po directory and then do:
# cd po; make update-po

@SNIPPET2@

.PHONY: all install install-user uninstall uninstall-user clean $(LANGUAGES)
.PHONY: update-po update-pot

Expand All @@ -31,13 +29,13 @@ $(PO_FILES): $(GETTEXT_PACKAGE).pot

install-data-local: $(LANGUAGES)
for L in $(LANGUAGES); \
do $(MKDIR_P) -p "$(DESTDIR)$(gimplocaledir)/$$L/LC_MESSAGES"; \
install -v -m 0644 $(builddir)/$$L.mo "$(DESTDIR)$(gimplocaledir)/$$L/LC_MESSAGES/$(GETTEXT_PACKAGE).mo"; \
do $(MKDIR_P) -p "$(DESTDIR)$(LOCALEDIR)/$$L/LC_MESSAGES"; \
install -v -m 0644 $(builddir)/$$L.mo "$(DESTDIR)$(LOCALEDIR)/$$L/LC_MESSAGES/$(GETTEXT_PACKAGE).mo"; \
done

uninstall-local: $(LANGUAGES)
for L in $(LANGUAGES); \
do rm -vf "$(DESTDIR)$(gimplocaledir)/$$L/LC_MESSAGES/$(GETTEXT_PACKAGE).mo"; \
do rm -vf "$(DESTDIR)$(LOCALEDIR)/$$L/LC_MESSAGES/$(GETTEXT_PACKAGE).mo"; \
done

clean-local:
Expand All @@ -55,6 +53,6 @@ update-pot: $(GETTEXT_PACKAGE).pot
$(GETTEXT_PACKAGE).pot:
$(XGETTEXT) -k_ -k_\" -kd_\" -c -d $(GETTEXT_PACKAGE) -o $@ \
--package-version=$(PLUGIN_VERSION) --msgid-bugs-address=$(PLUGIN_EMAIL) --package-name=$(PLUGIN_PACKAGE_NAME) \
$(top_srcdir)/cmd-line/*.c $(top_srcdir)/gimp-plugin/*.c
$(top_srcdir)/gimp-plugin/*.c

EXTRA_DIST = $(PO_FILES) $(GETTEXT_PACKAGE).pot
Loading

0 comments on commit d3b00cd

Please sign in to comment.