<commit_before>PROGRAM = shotwell
VERSION = 0.3.1
GETTEXT_PACKAGE = $(PROGRAM)
BUILD_ROOT = 1

VALAC = valac
MIN_VALAC_VERSION = 0.7.7
INSTALL_PROGRAM = install
INSTALL_DATA = install -m 644

# defaults that may be overridden by configure.mk
PREFIX=/usr/local
BUILD_RELEASE=1

SUPPORTED_LANGUAGES=fr
LOCAL_LANG_DIR=locale-langpack
SYSTEM_LANG_DIR=/usr/share/locale-langpack

UNAME := $(shell uname)
SYSTEM := $(UNAME:MINGW32_%=MinGW)

ifeq "$(SYSTEM)" "Linux"
  LINUX = 1
endif

ifeq "$(SYSTEM)" "MinGW"
  WINDOWS = 1
endif

ifeq "$(SYSTEM)" "Darwin"
  MAC = 1
endif

-include configure.mk

VALAFLAGS = -g --enable-checking --thread $(USER_VALAFLAGS)
DEFINES=_PREFIX='"$(PREFIX)"' _VERSION='"$(VERSION)"' GETTEXT_PACKAGE='"$(GETTEXT_PACKAGE)"' \
     _LANG_SUPPORT_DIR='"$(SYSTEM_LANG_DIR)"'

SRC_FILES = \
	main.vala \
	AppWindow.vala \
	CollectionPage.vala \
	Thumbnail.vala \
	DatabaseTables.vala \
	ThumbnailCache.vala \
	image_util.vala \
	CheckerboardLayout.vala \
	PhotoPage.vala \
	Exif.vala \
	Page.vala \
	ImportPage.vala \
	GPhoto.vala \
	SortedList.vala \
	EventsDirectoryPage.vala \
	Dimensions.vala \
	Box.vala \
	Photo.vala \
	Orientation.vala \
	util.vala \
	BatchImport.vala \
	Dialogs.vala \
	Resources.vala \
	Debug.vala \
	Sidebar.vala \
	ColorTransformation.vala \
	EditingTools.vala \
	DataObject.vala \
	DataCollection.vala \
	LibraryWindow.vala \
	CameraTable.vala \
	DirectWindow.vala \
	Properties.vala \
	CustomComponents.vala \
	Config.vala \
	Event.vala \
	International.vala \
	Workers.vala \
	system.vala

VAPI_FILES = \
	libexif.vapi \
	FStream.vapi \
	libgphoto2.vapi \
	FixedKeyFile.vapi \
	ExtendedPosix.vapi

RESOURCE_FILES = \
	photo.ui \
	collection.ui \
	import.ui \
	fullscreen.ui \
	import_queue.ui \
	events_directory.ui \
	event.ui \
	direct.ui

SRC_HEADER_FILES = \
	gphoto.h

TEXT_FILES = \
	AUTHORS \
	COPYING \
	INSTALL \
	MAINTAINERS \
	NEWS \
	README \
	THANKS

VAPI_DIRS = \
	./src \
	./vapi

HEADER_DIRS = \
	./src

LOCAL_PKGS = \
	FStream \
	FixedKeyFile \
	ExtendedPosix \
	posix

EXT_PKGS = \
	gtk+-2.0 \
	gdk-2.0 \
	atk \
	gee-1.0 \
	libexif \
	sqlite3
	
ifdef LINUX
EXT_PKGS += \
	hal \
	dbus-glib-1 \
	unique-1.0 \
	libgphoto2 \
	gconf-2.0
endif

ifdef MAC
  EXT_PKGS += ige-mac-integration
endif

EXT_PKG_VERSIONS = \
	gtk+-2.0 >= 2.14.4 \
	gee-1.0 >= 0.5.0 \
	libexif >= 0.6.16 \
	sqlite3 >= 3.5.9
	
ifdef LINUX
EXT_PKG_VERSIONS += \
	hal >= 0.5.11 \
	dbus-glib-1 >= 0.76 \
	unique-1.0 >= 1.0.0 \
	libgphoto2 >= 2.4.2 \
	gconf-2.0 >= 2.24.1
endif

PKGS = $(EXT_PKGS) $(LOCAL_PKGS)

ifndef BUILD_DIR
BUILD_DIR=src
endif

EXPANDED_PO_FILES = $(foreach po,$(SUPPORTED_LANGUAGES),po/$(po).po)
EXPANDED_SRC_FILES = $(foreach src,$(SRC_FILES),src/$(src))
EXPANDED_C_FILES = $(foreach src,$(SRC_FILES),$(BUILD_DIR)/$(src:.vala=.c))
EXPANDED_SAVE_TEMPS_FILES = $(foreach src,$(SRC_FILES),$(BUILD_DIR)/$(src:.vala=.vala.c))
EXPANDED_OBJ_FILES = $(foreach src,$(SRC_FILES),$(BUILD_DIR)/$(src:.vala=.o))

EXPANDED_VAPI_FILES = $(foreach vapi,$(VAPI_FILES),src/$(vapi))
EXPANDED_SRC_HEADER_FILES = $(foreach header,$(SRC_HEADER_FILES),src/$(header))
EXPANDED_RESOURCE_FILES = $(foreach res,$(RESOURCE_FILES),ui/$(res))
VALA_STAMP = $(BUILD_DIR)/.stamp
LANG_STAMP = $(LOCAL_LANG_DIR)/.langstamp

DIST_FILES = Makefile configure $(EXPANDED_SRC_FILES) $(EXPANDED_VAPI_FILES) \
	$(EXPANDED_SRC_HEADER_FILES) $(EXPANDED_RESOURCE_FILES) $(TEXT_FILES) icons/* misc/* \
	$(EXPANDED_PO_FILES) vapi/*

DIST_TAR = $(PROGRAM)-$(VERSION).tar
DIST_TAR_BZ2 = $(DIST_TAR).bz2
DIST_TAR_GZ = $(DIST_TAR).gz
PACKAGE_ORIG_GZ = $(PROGRAM)_`parsechangelog | grep Version | sed 's/.*: //'`.orig.tar.gz

VALA_CFLAGS = `pkg-config --cflags $(EXT_PKGS)` $(foreach hdir,$(HEADER_DIRS),-I$(hdir)) \
	$(foreach def,$(DEFINES),-D$(def))

VALA_LDFLAGS = `pkg-config --libs $(EXT_PKGS)` -lgthread-2.0

ifdef WINDOWS
  VALA_DEFINES = -D NO_CAMERA -D NO_LIBUNIQUE -D NO_GCONF -D NO_SVG -D NO_EXTENDED_POSIX<commit_msg>Use GConf on Windows.<commit_after>PROGRAM = shotwell
VERSION = 0.3.1
GETTEXT_PACKAGE = $(PROGRAM)
BUILD_ROOT = 1

VALAC = valac
MIN_VALAC_VERSION = 0.7.7
INSTALL_PROGRAM = install
INSTALL_DATA = install -m 644

# defaults that may be overridden by configure.mk
PREFIX=/usr/local
BUILD_RELEASE=1

SUPPORTED_LANGUAGES=fr
LOCAL_LANG_DIR=locale-langpack
SYSTEM_LANG_DIR=/usr/share/locale-langpack

UNAME := $(shell uname)
SYSTEM := $(UNAME:MINGW32_%=MinGW)

ifeq "$(SYSTEM)" "Linux"
  LINUX = 1
endif

ifeq "$(SYSTEM)" "MinGW"
  WINDOWS = 1
endif

ifeq "$(SYSTEM)" "Darwin"
  MAC = 1
endif

-include configure.mk

VALAFLAGS = -g --enable-checking --thread $(USER_VALAFLAGS)
DEFINES=_PREFIX='"$(PREFIX)"' _VERSION='"$(VERSION)"' GETTEXT_PACKAGE='"$(GETTEXT_PACKAGE)"' \
     _LANG_SUPPORT_DIR='"$(SYSTEM_LANG_DIR)"'

SRC_FILES = \
	main.vala \
	AppWindow.vala \
	CollectionPage.vala \
	Thumbnail.vala \
	DatabaseTables.vala \
	ThumbnailCache.vala \
	image_util.vala \
	CheckerboardLayout.vala \
	PhotoPage.vala \
	Exif.vala \
	Page.vala \
	ImportPage.vala \
	GPhoto.vala \
	SortedList.vala \
	EventsDirectoryPage.vala \
	Dimensions.vala \
	Box.vala \
	Photo.vala \
	Orientation.vala \
	util.vala \
	BatchImport.vala \
	Dialogs.vala \
	Resources.vala \
	Debug.vala \
	Sidebar.vala \
	ColorTransformation.vala \
	EditingTools.vala \
	DataObject.vala \
	DataCollection.vala \
	LibraryWindow.vala \
	CameraTable.vala \
	DirectWindow.vala \
	Properties.vala \
	CustomComponents.vala \
	Config.vala \
	Event.vala \
	International.vala \
	Workers.vala \
	system.vala

VAPI_FILES = \
	libexif.vapi \
	FStream.vapi \
	libgphoto2.vapi \
	FixedKeyFile.vapi \
	ExtendedPosix.vapi

RESOURCE_FILES = \
	photo.ui \
	collection.ui \
	import.ui \
	fullscreen.ui \
	import_queue.ui \
	events_directory.ui \
	event.ui \
	direct.ui

SRC_HEADER_FILES = \
	gphoto.h

TEXT_FILES = \
	AUTHORS \
	COPYING \
	INSTALL \
	MAINTAINERS \
	NEWS \
	README \
	THANKS

VAPI_DIRS = \
	./src \
	./vapi

HEADER_DIRS = \
	./src

LOCAL_PKGS = \
	FStream \
	FixedKeyFile \
	ExtendedPosix \
	posix

EXT_PKGS = \
	gtk+-2.0 \
	gdk-2.0 \
	atk \
	gee-1.0 \
	libexif \
	sqlite3
	
ifdef LINUX
EXT_PKGS += \
	hal \
	dbus-glib-1 \
	unique-1.0 \
	libgphoto2
endif

ifdef MAC
EXT_PKGS += \
    ige-mac-integration
else
EXT_PKGS += \
    gconf-2.0
endif

EXT_PKG_VERSIONS = \
	gtk+-2.0 >= 2.14.4 \
	gee-1.0 >= 0.5.0 \
	libexif >= 0.6.16 \
	sqlite3 >= 3.5.9
	
ifdef LINUX
EXT_PKG_VERSIONS += \
	hal >= 0.5.11 \
	dbus-glib-1 >= 0.76 \
	unique-1.0 >= 1.0.0 \
	libgphoto2 >= 2.4.2
endif

ifndef MAC
EXT_PKG_VERSIONS += \
	gconf-2.0 >= 2.22.0
endif

PKGS = $(EXT_PKGS) $(LOCAL_PKGS)

ifndef BUILD_DIR
BUILD_DIR=src
endif

EXPANDED_PO_FILES = $(foreach po,$(SUPPORTED_LANGUAGES),po/$(po).po)
EXPANDED_SRC_FILES = $(foreach src,$(SRC_FILES),src/$(src))
EXPANDED_C_FILES = $(foreach src,$(SRC_FILES),$(BUILD_DIR)/$(src:.vala=.c))
EXPANDED_SAVE_TEMPS_FILES = $(foreach src,$(SRC_FILES),$(BUILD_DIR)/$(src:.vala=.vala.c))
EXPANDED_OBJ_FILES = $(foreach src,$(SRC_FILES),$(BUILD_DIR)/$(src:.vala=.o))

EXPANDED_VAPI_FILES = $(foreach vapi,$(VAPI_FILES),src/$(vapi))
EXPANDED_SRC_HEADER_FILES = $(foreach header,$(SRC_HEADER_FILES),src/$(header))
EXPANDED_RESOURCE_FILES = $(foreach res,$(RESOURCE_FILES),ui/$(res))
VALA_STAMP = $(BUILD_DIR)/.stamp
LANG_STAMP = $(LOCAL_LANG_DIR)/.langstamp

DIST_FILES = Makefile configure $(EXPANDED_SRC_FILES) $(EXPANDED_VAPI_FILES) \
	$(EXPANDED_SRC_HEADER_FILES) $(EXPANDED_RESOURCE_FILES) $(TEXT_FILES) icons/* misc/* \
	$(EXPANDED_PO_FILES) vapi/*

DIST_TAR = $(PROGRAM)-$(VERSION).tar
DIST_TAR_BZ2 = $(DIST_TAR).bz2
DIST_TAR_GZ = $(DIST_TAR).gz
PACKAGE_ORIG_GZ = $(PROGRAM)_`parsechangelog | grep Version | sed 's/.*: //'`.orig.tar.gz

VALA_CFLAGS = `pkg-config --cflags $(EXT_PKGS)` $(foreach hdir,$(HEADER_DIRS),-I$(hdir)) \
	$(foreach def,$(DEFINES),-D$(def))

VALA_LDFLAGS = `pkg-config --libs $(EXT_PKGS)` -lgthread-2.0

ifdef WINDOWS
  VALA_DEFINES = -D NO_CAMERA -D NO_LIBUNIQUE -D NO_SVG -D NO_EXTENDED_POSIX
{'fraction_non_alphanumeric': 0.1529040404040404, 'fraction_numerical': 0.01919191919191919, 'mean_word_length': 3.7947941888619856, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5333073', 'n_tokens_mistral': 3640, 'n_tokens_neox': 3422, 'n_words': 544}