Skip to content

Commit

Permalink
chore: Update to latest libexif.
Browse files Browse the repository at this point in the history
  • Loading branch information
iphydf committed Jan 9, 2025
1 parent 52d6aac commit c9dc3bb
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 39 deletions.
19 changes: 11 additions & 8 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -527,13 +527,16 @@ http_archive(
urls = ["https://ffmpeg.org/releases/ffmpeg-7.1.tar.bz2"],
)

# https://ftp.gnu.org/pub/gnu/gettext
http_archive(
nixpkgs_package(
name = "gettext",
build_file = "@toktok//third_party:gettext.BUILD",
sha256 = "ec1705b1e969b83a9f073144ec806151db88127f5e40fe5a94cb6c8fa48996a0",
strip_prefix = "gettext-0.22.5",
urls = ["https://ftp.gnu.org/pub/gnu/gettext/gettext-0.22.5.tar.gz"],
attribute_path = "gettext",
repository = "@nixpkgs",
)

nixpkgs_package(
name = "xz",
attribute_path = "xz",
repository = "@nixpkgs",
)

nixpkgs_package(
Expand Down Expand Up @@ -589,9 +592,9 @@ http_archive(
# https://github.com/libexif/libexif
new_github_archive(
name = "libexif",
integrity = "sha256-tsLrkGxLL/VgM1k3AF9M5Ev02UCzGllAcUSI9usAOQU=",
repo = "libexif/libexif",
sha256 = "8e418041aba29a956eaf4ae1e0aa46bbc1a73d66916f6c3bf596067f13f942a5",
version = "00ee559ac8293c6ab9b0b4d26d3650ec89d2b1fc",
version = "8f013418c2ee71f7aaa81b1699e48d9d3c22dd9b",
)

http_archive(
Expand Down
16 changes: 0 additions & 16 deletions third_party/gettext.BUILD

This file was deleted.

30 changes: 27 additions & 3 deletions third_party/libexif.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,39 @@ genrule(
],
outs = ["config.h"],
cmd = """
cd `dirname $(location configure.ac)`
autoreconf -fi
./configure
BASE=`pwd`
export PATH="$$PATH:$$BASE/$$(dirname $(location @autoconf//:autoconf))"
export PATH="$$PATH:$$BASE/$$(dirname $(location @automake//:aclocal))"
export PATH="$$PATH:$$BASE/$$(dirname $(location @diffutils//:cmp))"
export PATH="$$PATH:$$BASE/$$(dirname $(location @gettext//:bin/autopoint))"
export PATH="$$PATH:$$BASE/$$(dirname $(location @libtool//:libtoolize))"
export PATH="$$PATH:$$BASE/$$(dirname $(location @m4))"
export PATH="$$PATH:$$BASE/$$(dirname $(location @xz//:bin/xz))"
SRCDIR="$$(dirname $(location configure.ac))"
autoreconf -fi -I "$$PWD/$$(dirname $(location @libtool//:libtool.m4))" "$$SRCDIR"

cd "$$SRCDIR"
./configure CC="$(CC)" AR="$(AR)" MAKE="$$BASE/$(location @gnumake)" || (cat config.log && false)
DIR=`pwd`
cd -
for i in $(OUTS); do
cp $$DIR/`echo $$i | sed -e 's|$(GENDIR)/external/libexif/||'` $$i
done
""",
toolchains = ["@rules_cc//cc:current_cc_toolchain"],
tools = [
"@autoconf",
"@autoconf//:autoreconf",
"@automake",
"@automake//:aclocal",
"@diffutils//:cmp",
"@gettext//:bin/autopoint",
"@gnumake",
"@libtool//:libtool.m4",
"@libtool//:libtoolize",
"@m4",
"@xz//:bin/xz",
],
)

genrule(
Expand Down
46 changes: 34 additions & 12 deletions third_party/libexif/linux/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@
language is requested. */
#define ENABLE_NLS 1

/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the
CoreFoundation framework. */
/* #undef HAVE_CFLOCALECOPYCURRENT */

/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in
the CoreFoundation framework. */
/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */

/* Define if the GNU dcgettext() function is already present or preinstalled.
*/
#define HAVE_DCGETTEXT 1
Expand All @@ -15,21 +23,24 @@
/* Define if the GNU gettext() function is already present or preinstalled. */
#define HAVE_GETTEXT 1

/* Define if you have the iconv() function. */
/* Define if you have the iconv() function and it works. */
#define HAVE_ICONV 1

/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1

/* Define to 1 if you have the `localtime_r' function. */
/* Define to 1 if you have the 'localtime_r' function. */
#define HAVE_LOCALTIME_R 1

/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have localtime_s() */
/* #undef HAVE_LOCALTIME_S */

/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1

/* Define to 1 if you have the <stdio.h> header file. */
#define HAVE_STDIO_H 1

/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1

Expand Down Expand Up @@ -64,27 +75,38 @@
#define PACKAGE_NAME "EXIF library"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "EXIF library 0.6.21"
#define PACKAGE_STRING "EXIF library 0.6.24.1"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "libexif"

/* Define to the home page for this package. */
#define PACKAGE_URL ""
#define PACKAGE_URL "https://libexif.github.io/"

/* Define to the version of this package. */
#define PACKAGE_VERSION "0.6.21"
#define PACKAGE_VERSION "0.6.24.1"

/* Define to 1 if you have the ANSI C header files. */
/* Define to 1 if all of the C89 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
#define STDC_HEADERS 1

/* Version number of package */
#define VERSION "0.6.21"
#define VERSION "0.6.24.1"

/* Number of bits in a file offset, on hosts where this is settable. */
/* #undef _FILE_OFFSET_BITS */

/* Define to 1 on platforms where this makes off_t a 64-bit type. */
/* #undef _LARGE_FILES */

/* Number of bits in time_t, on hosts where this is settable. */
/* #undef _TIME_BITS */

/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to 1 on platforms where this makes time_t a 64-bit type. */
/* #undef __MINGW_USE_VC2005_COMPAT */

/* Define to `__inline__' or `__inline' if that's what the C compiler
/* Define to '__inline__' or '__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
Expand Down

0 comments on commit c9dc3bb

Please sign in to comment.