diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f3af842be..10de44632 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,7 +5,7 @@ stages: # FIXME: Use --werror once warnings are fixed. variables: - MESON_ARGS: --fatal-meson-warnings + MESON_ARGS: --fatal-meson-warnings --default-library=both MESON_ARGS_WINDOWS: ${MESON_ARGS} --force-fallback-for=zlib .build windows common: @@ -48,7 +48,17 @@ variables: # Make sure meson is up to date so we don't need to rebuild the image # with each release. - pip3 install meson==0.59.1 + - pip3 install --upgrade certifi - pip3 install -U ninja + + # Generate a UWP cross-file in case it's used + - $PSDefaultParameterValues['Out-File:Encoding'] = 'ASCII' + - echo "[binaries]" > uwp-crossfile.meson + - echo "c = 'cl'" >> uwp-crossfile.meson + - echo "strip = ['true']" >> uwp-crossfile.meson + - echo "[built-in options]" >> uwp-crossfile.meson + - echo "c_args = ['-DWINAPI_FAMILY=WINAPI_FAMILY_APP', '-DUNICODE', '-D_WIN32_WINNT=0x0A00', '-we4013']" >> uwp-crossfile.meson + - echo "c_winlibs = ['windowsapp.lib']" >> uwp-crossfile.meson script: # For some reason, options are separated by newlines instead of spaces, # so we have to replace them first. @@ -59,11 +69,10 @@ variables: # script. Environment variables substitutions is done by PowerShell # before calling `cmd.exe`, that's why we use `$env:FOO` instead of # `%FOO%`. - - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH && - meson setup build $env:MESON_ARGS_WINDOWS && - meson compile --verbose -C build && - meson test -C build && - meson test -C build --benchmark" + - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH $env:VS_UWP && + meson setup build $env:MESON_ARGS_WINDOWS $env:MESON_ARGS_UWP && + meson compile --verbose -C build + $env:MESON_WINDOWS_TESTS" # Format of job names: @@ -76,12 +85,20 @@ windows meson vs2017 amd64: extends: '.build windows meson' variables: ARCH: 'amd64' + MESON_WINDOWS_TESTS: '&& meson test -C build && meson test -C build --benchmark' windows meson vs2017 x86: extends: '.build windows meson' variables: ARCH: 'x86' + MESON_WINDOWS_TESTS: '&& meson test -C build && meson test -C build --benchmark' +windows meson vs2017 amd64 uwp: + extends: '.build windows meson' + variables: + ARCH: 'amd64' + VS_UWP: '-app_platform=UWP' + MESON_ARGS_UWP: '--cross-file uwp-crossfile.meson -Dc_winlibs="windowsapp.lib"' # Linux Jobs. # @@ -130,7 +147,8 @@ linux autotools libs clang: linux meson: extends: '.build linux common' script: | - meson setup build -Dbrotli=disabled \ + meson setup build ${MESON_ARGS} \ + -Dbrotli=disabled \ -Dbzip2=disabled \ -Dharfbuzz=disabled \ -Dpng=disabled \ @@ -142,7 +160,8 @@ linux meson: linux meson libs: extends: '.build linux common' script: | - meson setup build -Dbrotli=enabled \ + meson setup build ${MESON_ARGS} \ + -Dbrotli=enabled \ -Dbzip2=enabled \ -Dharfbuzz=disabled \ -Dpng=disabled \ @@ -205,7 +224,7 @@ macos meson: - pip3 install -U meson - pip3 install --upgrade certifi - pip3 install -U ninja - - - meson setup build + + - meson setup build ${MESON_ARGS} - meson compile --verbose -C build - sudo meson install -C build diff --git a/CMakeLists.txt b/CMakeLists.txt index 7168cc14d..cd04b9745 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -163,7 +163,7 @@ project(freetype C) set(VERSION_MAJOR "2") set(VERSION_MINOR "12") -set(VERSION_PATCH "0") +set(VERSION_PATCH "1") # Generate LIBRARY_VERSION and LIBRARY_SOVERSION. set(LIBTOOL_REGEX "version_info='([0-9]+):([0-9]+):([0-9]+)'") @@ -491,46 +491,48 @@ if (BUILD_FRAMEWORK) ) set_target_properties(freetype PROPERTIES FRAMEWORK TRUE - MACOSX_FRAMEWORK_INFO_PLIST builds/mac/freetype-Info.plist + MACOSX_FRAMEWORK_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/builds/mac/freetype-Info.plist PUBLIC_HEADER "${PUBLIC_HEADERS}" XCODE_ATTRIBUTE_INSTALL_PATH "@rpath" ) endif () -set(PKG_CONFIG_REQUIRED_PRIVATE "") -set(PKG_CONFIG_LIBS_PRIVATE "") +set(PKGCONFIG_REQUIRES "") +set(PKGCONFIG_REQUIRES_PRIVATE "") +set(PKGCONFIG_LIBS "-L\${libdir} -lfreetype") +set(PKGCONFIG_LIBS_PRIVATE "") if (ZLIB_FOUND) target_link_libraries(freetype PRIVATE ${ZLIB_LIBRARIES}) target_include_directories(freetype PRIVATE ${ZLIB_INCLUDE_DIRS}) - list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "zlib") + list(APPEND PKGCONFIG_REQUIRES_PRIVATE "zlib") endif () if (BZIP2_FOUND) target_link_libraries(freetype PRIVATE ${BZIP2_LIBRARIES}) target_include_directories(freetype PRIVATE ${BZIP2_INCLUDE_DIR}) # not BZIP2_INCLUDE_DIRS if (PC_BZIP2_FOUND) - list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "bzip2") + list(APPEND PKGCONFIG_REQUIRES_PRIVATE "bzip2") else () - list(APPEND PKG_CONFIG_LIBS_PRIVATE "-lbz2") + list(APPEND PKGCONFIG_LIBS_PRIVATE "-lbz2") endif () endif () if (PNG_FOUND) target_link_libraries(freetype PRIVATE ${PNG_LIBRARIES}) target_compile_definitions(freetype PRIVATE ${PNG_DEFINITIONS}) target_include_directories(freetype PRIVATE ${PNG_INCLUDE_DIRS}) - list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "libpng") + list(APPEND PKGCONFIG_REQUIRES_PRIVATE "libpng") endif () if (HarfBuzz_FOUND) target_link_libraries(freetype PRIVATE ${HarfBuzz_LIBRARY}) target_include_directories(freetype PRIVATE ${HarfBuzz_INCLUDE_DIRS}) - list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "harfbuzz >= ${HARFBUZZ_MIN_VERSION}") + list(APPEND PKGCONFIG_REQUIRES_PRIVATE "harfbuzz >= ${HARFBUZZ_MIN_VERSION}") endif () if (BROTLIDEC_FOUND) target_link_libraries(freetype PRIVATE ${BROTLIDEC_LIBRARIES}) target_compile_definitions(freetype PRIVATE ${BROTLIDEC_DEFINITIONS}) target_include_directories(freetype PRIVATE ${BROTLIDEC_INCLUDE_DIRS}) - list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "libbrotlidec") + list(APPEND PKGCONFIG_REQUIRES_PRIVATE "libbrotlidec") endif () @@ -557,7 +559,7 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) # Generate the pkg-config file file(READ "${PROJECT_SOURCE_DIR}/builds/unix/freetype2.in" FREETYPE2_PC_IN) - string(REPLACE ";" ", " PKG_CONFIG_REQUIRED_PRIVATE "${PKG_CONFIG_REQUIRED_PRIVATE}") + string(REPLACE ";" ", " PKGCONFIG_REQUIRES_PRIVATE "${PKGCONFIG_REQUIRES_PRIVATE}") string(REPLACE "%prefix%" ${CMAKE_INSTALL_PREFIX} FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) @@ -569,10 +571,26 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) string(REPLACE "%ft_version%" "${LIBTOOL_CURRENT}.${LIBTOOL_REVISION}.${LIBTOOL_AGE}" FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) - string(REPLACE "%REQUIRES_PRIVATE%" "${PKG_CONFIG_REQUIRED_PRIVATE}" - FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) - string(REPLACE "%LIBS_PRIVATE%" "${PKG_CONFIG_LIBS_PRIVATE}" - FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) + + if (BUILD_SHARED_LIBS) + string(REPLACE "%PKGCONFIG_REQUIRES%" "${PKGCONFIG_REQUIRES}" + FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) + string(REPLACE "%PKGCONFIG_REQUIRES_PRIVATE%" "${PKGCONFIG_REQUIRES_PRIVATE}" + FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) + string(REPLACE "%PKGCONFIG_LIBS%" "${PKGCONFIG_LIBS}" + FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) + string(REPLACE "%PKGCONFIG_LIBS_PRIVATE%" "${PKGCONFIG_LIBS_PRIVATE}" + FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) + else () + string(REPLACE "%PKGCONFIG_REQUIRES%" "${PKGCONFIG_REQUIRES} ${PKGCONFIG_REQUIRES_PRIVATE}" + FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) + string(REPLACE "%PKGCONFIG_REQUIRES_PRIVATE%" "" + FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) + string(REPLACE "%PKGCONFIG_LIBS%" "${PKGCONFIG_LIBS} ${PKGCONFIG_LIBS_PRIVATE}" + FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) + string(REPLACE "%PKGCONFIG_LIBS_PRIVATE%" "" + FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) + endif () set(FREETYPE2_PC_IN_NAME "${PROJECT_BINARY_DIR}/freetype2.pc") if (EXISTS "${FREETYPE2_PC_IN_NAME}") diff --git a/README b/README index a33cb11aa..7a8a2dced 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -FreeType 2.12.0 +FreeType 2.12.1 =============== Homepage: https://www.freetype.org @@ -30,9 +30,9 @@ sites. Go to and download one of the following files. - freetype-doc-2.12.0.tar.xz - freetype-doc-2.12.0.tar.gz - ftdoc2120.zip + freetype-doc-2.12.1.tar.xz + freetype-doc-2.12.1.tar.gz + ftdoc2121.zip To view the documentation online, go to diff --git a/autogen.sh b/autogen.sh index 1545c63ad..b5fc1beb5 100755 --- a/autogen.sh +++ b/autogen.sh @@ -182,7 +182,7 @@ copy_submodule_files () cp $DLG_SRC_DIR/* src/dlg } -if test -d ".git"; then +if test -e ".git"; then DLG_INC_DIR=subprojects/dlg/include/dlg DLG_SRC_DIR=subprojects/dlg/src/dlg diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw index cfb073efa..fb943fd2a 100644 --- a/builds/unix/configure.raw +++ b/builds/unix/configure.raw @@ -17,7 +17,7 @@ AC_CONFIG_SRCDIR([ftconfig.h.in]) # Don't forget to update `docs/VERSIONS.TXT'! -version_info='24:2:18' +version_info='24:3:18' AC_SUBST([version_info]) ft_version=`echo $version_info | tr : .` AC_SUBST([ft_version]) @@ -530,16 +530,28 @@ AC_SEARCH_LIBS([clock_gettime], [test "$ac_cv_search_clock_gettime" = "none required" \ || LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime]) -# 'librsvg' is needed to demonstrate SVG support. -PKG_CHECK_MODULES([LIBRSVG], [librsvg-2.0 >= 2.46.0], - [have_librsvg="yes (pkg-config)"], [have_librsvg=no]) - FT_DEMO_CFLAGS="" FT_DEMO_LDFLAGS="$LIB_CLOCK_GETTIME" -if test "$have_librsvg" != no; then - FT_DEMO_CFLAGS="$FT_DEMO_CFLAGS $LIBRSVG_CFLAGS -DHAVE_LIBRSVG" - FT_DEMO_LDFLAGS="$FT_DEMO_LDFLAGS $LIBRSVG_LIBS" +# 'librsvg' is needed to demonstrate SVG support. +AC_ARG_WITH([librsvg], + [AS_HELP_STRING([--with-librsvg=@<:@yes|no|auto@:>@], + [support OpenType SVG fonts in FreeType demo programs @<:@default=auto@:>@])], + [], [with_librsvg=auto]) + +have_librsvg=no +if test x"$with_librsvg" = xyes -o x"$with_librsvg" = xauto; then + PKG_CHECK_MODULES([LIBRSVG], [librsvg-2.0 >= 2.46.0], + [have_librsvg="yes (pkg-config)"], [:]) + + if test "$have_librsvg" != no; then + FT_DEMO_CFLAGS="$FT_DEMO_CFLAGS $LIBRSVG_CFLAGS -DHAVE_LIBRSVG" + FT_DEMO_LDFLAGS="$FT_DEMO_LDFLAGS $LIBRSVG_LIBS" + fi +fi + +if test x"$with_librsvg" = xyes -a "$have_librsvg" = no; then + AC_MSG_ERROR([librsvg support requested but library not found]) fi AC_SUBST([FT_DEMO_CFLAGS]) diff --git a/builds/wince/vc2005-ce/index.html b/builds/wince/vc2005-ce/index.html index 2289c76b8..0b711ff90 100644 --- a/builds/wince/vc2005-ce/index.html +++ b/builds/wince/vc2005-ce/index.html @@ -21,7 +21,7 @@

  • PPC/SP WM6 (Windows Mobile 6)
  • -It compiles the following libraries from the FreeType 2.12.0 sources:

    +It compiles the following libraries from the FreeType 2.12.1 sources:

    -It compiles the following libraries from the FreeType 2.12.0 sources:

    +It compiles the following libraries from the FreeType 2.12.1 sources: