Skip to content

Commit

Permalink
📦 Add pango dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
dbouron committed May 5, 2022
1 parent b392806 commit 9a45ddb
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/docker/linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ RUN yum install ${YUM_OPTIONS} \
mpfr-devel \
gmp-devel \
libmpc-devel \
pango-devel \
gtk-doc \
gobject-introspection gobject-introspection-devel \
glib2.x86_64 glib2-devel.x86_64 \
fontconfig-devel \
java-1.8.0-openjdk

RUN ln -s /usr/bin/cmake3 /usr/bin/cmake
Expand Down
2 changes: 1 addition & 1 deletion .github/docker/windows/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ RUN yum install ${YUM_OPTIONS} \
mingw64-glib2 \
mingw64-win-iconv \
mingw64-expat \
mingw64-pango
mingw-w64-x86_64

# Link the system version of libmpfr, which is more recent than expected, but works fine.
RUN ln -s /lib64/libmpfr.so.6 /lib64/libmpfr.so.4
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ For Fedora and CentOS:
sudo yum install vips
```

However, note that `JVips.jar` embeds `libvips.so` and its dependencies (expected pango used for `vips_text`). The `jar` file is self-sufficient for Linux. Look the `--minimal` flag documented below if you don't want this behavior and prefer to rely on system-wide libraries.
However, note that `JVips.jar` embeds `libvips.so` and its dependencies. The `jar` file is self-sufficient for Linux. Look the `--minimal` flag documented below if you don't want this behavior and prefer to rely on system-wide libraries.

### 🏁 Windows

Expand Down Expand Up @@ -211,7 +211,7 @@ $ docker run --rm -v $(pwd):/app -w /app -u root -it builder bash
- [ ] Add the missing operations
- [ ] Adapt the binding design for calling function by operation name (see also: https://libvips.github.io/libvips/API/current/binding.md.html)
- [ ] Publish artifacts to Maven Central
- [ ] Build pango and its dependencies from scratch (check how to deal with meson and ninja with cmake `ExternalProject_Add` function)
- [ ] Build Fontconfig for pango (fc-cache segfault during the installation)
# Contact
Expand Down
21 changes: 19 additions & 2 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ if(NOT CAIRO)
--disable-static
--disable-docs
--disable-gl
--disable-xlib
--enable-xlib
--disable-xcb
--without-x
--disable-ps
Expand All @@ -276,6 +276,23 @@ else()
add_custom_target(cairo "")
endif()

find_library(PANGO pango PATHS "${EXT_INSTALL_DIR}/lib" NO_DEFAULT_PATH)
if(NOT PANGO)
ExternalProject_Add(pango
URL "https://gitlab.gnome.org/GNOME/pango/-/archive/${PANGO_VERSION}/pango-${PANGO_VERSION}.tar.gz"
PREFIX "${CMAKE_CURRENT_BINARY_DIR}/pango"
CONFIGURE_COMMAND meson ${CMAKE_CURRENT_BINARY_DIR}/pango/buildir
${MESON_VARS}
-Dintrospection=disabled
BUILD_COMMAND ninja -C ${CMAKE_CURRENT_BINARY_DIR}/pango/buildir
INSTALL_COMMAND ninja -C ${CMAKE_CURRENT_BINARY_DIR}/pango/buildir install
BUILD_IN_SOURCE 1
DEPENDS cairo freetype harfbuzz fribidi
)
else()
add_custom_target(pango "")
endif()

find_library(GIFLIB gif PATHS "${EXT_INSTALL_DIR}/lib" NO_DEFAULT_PATH)
if (NOT GIFLIB)
# giflib hasn't a standard build system, don't append CONFIGURE_VARS
Expand Down Expand Up @@ -410,7 +427,7 @@ if(NOT VIPS)
--without-rsvg
${LIBSPNG_FLAGS}
${LIBHEIF_FLAGS}
DEPENDS libjpeg libpng libspng giflib libwebp libimagequant lcms2 libheif tiff
DEPENDS libjpeg libpng libspng giflib libwebp libimagequant lcms2 libheif tiff pango
BUILD_IN_SOURCE 1
)
else()
Expand Down
1 change: 1 addition & 0 deletions lib/VERSIONS
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ VIPS_VERSION=8.12.2
FRIBIDI_VERSION=1.0.10
PIXMAN_VERSION=0.40.0
CAIRO_VERSION=1.16.0
PANGO_VERSION=1.48.0
VIPS_VERSION=8.12.1
>>>>>>> 📦 Add Fribidi dependency
1 change: 1 addition & 0 deletions src/main/java/com/criteo/vips/Vips.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class Vips {
"png16",
"spng",
"cairo",
"pango",
"gif",
"jpeg",
"turbojpeg",
Expand Down

0 comments on commit 9a45ddb

Please sign in to comment.