mingw-w64-fossil: Revert 1.35 patch, update to v1.34
This reverts commit 9ff0a4ec8d.
This commit is contained in:
@@ -4,30 +4,49 @@
|
||||
# Contributor (Arch Linux): Konstantin Plotnikov <kostyapl at gmail dot com>
|
||||
|
||||
_realname=fossil
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=1.35
|
||||
pkgver=1.34
|
||||
pkgrel=1
|
||||
pkgdesc='Simple, high-reliability, distributed software configuration management (mingw-w64)'
|
||||
arch=('any')
|
||||
license=('BSD')
|
||||
url='http://www.fossil-scm.org/'
|
||||
optdepends=("${MINGW_PACKAGE_PREFIX}-openssl: SSL support")
|
||||
source=("${_realname}-src-${pkgver}.tar.gz::https://www.fossil-scm.org/index.html/tarball/${_realname}-src-${pkgver}.tar.gz?uuid=ec3dd27f97571cd66a2ac129fce0d0a738d58182")
|
||||
sha1sums=('464b3d4d1995bd4a1fed81f06a9beb0b54a9eafd')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-openssl"
|
||||
"${MINGW_PACKAGE_PREFIX}-sqlite3"
|
||||
"${MINGW_PACKAGE_PREFIX}-zlib")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-tcl")
|
||||
optdepends=("${MINGW_PACKAGE_PREFIX}-putty: SSH transport")
|
||||
source=("https://www.fossil-scm.org/download/${_realname}-src-${pkgver}.tar.gz"
|
||||
"win.patch"
|
||||
"readline.patch")
|
||||
sha256sums=('53a6b83e878feced9ac7705f87e5b6ea82727314e3e19202ae1c46c7e4dba49f'
|
||||
'33bacb372f8e9a7b9508d17c013302a2ce9b30828e5623fd6126619f2f51b327'
|
||||
'6cba007bcb29364089fcbe6e644b4c2e352e37b047eed110b206ac962f3d8ab9')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realname}-src-${pkgver}"
|
||||
patch -p1 -i "${srcdir}/win.patch"
|
||||
patch -p0 -i "${srcdir}/readline.patch"
|
||||
# this doesn't get expanded, so delete it just to be sure
|
||||
sed -i '/ENABLE_MINIZ/d' Makefile.in
|
||||
}
|
||||
|
||||
build() {
|
||||
mkdir -p build-${MINGW_CHOST}
|
||||
cd build-${MINGW_CHOST}
|
||||
|
||||
[[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}"
|
||||
mkdir -p "${srcdir}/build-${MINGW_CHOST}"
|
||||
cd "${srcdir}/build-${MINGW_CHOST}"
|
||||
MSYS2_ARG_CONV_EXCL=--prefix \
|
||||
../${_realname}-src-${pkgver}/configure \
|
||||
--prefix=${MINGW_PREFIX} \
|
||||
--build=${MINGW_CHOST} \
|
||||
--host=${MINGW_CHOST}
|
||||
make
|
||||
--host=${MINGW_CHOST} \
|
||||
--disable-internal-sqlite
|
||||
|
||||
make \
|
||||
CFLAGS+="-DBROKEN_MINGW_CMDLINE=not_actually_broken"
|
||||
}
|
||||
|
||||
package() {
|
||||
cd build-${MINGW_CHOST}
|
||||
cd "${srcdir}/build-${MINGW_CHOST}"
|
||||
make DESTDIR="${pkgdir}" install
|
||||
}
|
||||
|
||||
108
mingw-w64-fossil/readline.patch
Normal file
108
mingw-w64-fossil/readline.patch
Normal file
@@ -0,0 +1,108 @@
|
||||
Index: auto.def
|
||||
==================================================================
|
||||
--- auto.def
|
||||
+++ auto.def
|
||||
@@ -14,10 +14,11 @@
|
||||
with-tcl-stubs=0 => {Enable Tcl integration via stubs library mechanism}
|
||||
with-tcl-private-stubs=0
|
||||
=> {Enable Tcl integration via private stubs mechanism}
|
||||
internal-sqlite=1 => {Don't use the internal SQLite, use the system one}
|
||||
static=0 => {Link a static executable}
|
||||
+ lineedit=1 => {Disable line editing}
|
||||
fusefs=1 => {Disable the Fuse Filesystem}
|
||||
fossil-debug=0 => {Build with fossil debugging enabled}
|
||||
json=0 => {Build with fossil JSON API enabled}
|
||||
}
|
||||
|
||||
@@ -260,10 +259,24 @@
|
||||
if {![cc-check-includes zlib.h] || ![cc-check-function-in-lib inflateEnd z]} {
|
||||
user-error "zlib not found please install it or specify the location with --with-zlib"
|
||||
}
|
||||
}
|
||||
|
||||
+if {[opt-bool lineedit]} {
|
||||
+ # Need readline-compatible line editing
|
||||
+ cc-with {-includes stdio.h} {
|
||||
+ if {[cc-check-includes readline/readline.h] && [cc-check-function-in-lib readline readline]} {
|
||||
+ define-append EXTRA_CFLAGS -DHAVE_READLINE
|
||||
+ msg-result "Using readline for line editing"
|
||||
+ } elseif {[cc-check-includes editline/readline.h] && [cc-check-function-in-lib readline edit]} {
|
||||
+ define-feature editline
|
||||
+ define-append EXTRA_CFLAGS -DHAVE_EDITLINE
|
||||
+ msg-result "Using editline for line editing"
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
# Network functions require libraries on some systems
|
||||
cc-check-function-in-lib gethostbyname nsl
|
||||
if {![cc-check-function-in-lib socket {socket network}]} {
|
||||
# Last resort, may be Windows
|
||||
if {[string match *mingw* [get-define host]]} {
|
||||
|
||||
Index: src/main.mk
|
||||
==================================================================
|
||||
--- src/main.mk
|
||||
+++ src/main.mk
|
||||
@@ -510,11 +510,10 @@
|
||||
|
||||
|
||||
EXTRAOBJ = \
|
||||
$(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) \
|
||||
$(MINIZ_OBJ.$(FOSSIL_ENABLE_MINIZ)) \
|
||||
- $(OBJDIR)/linenoise.o \
|
||||
$(OBJDIR)/shell.o \
|
||||
$(OBJDIR)/th.o \
|
||||
$(OBJDIR)/th_lang.o \
|
||||
$(OBJDIR)/th_tcl.o \
|
||||
$(OBJDIR)/cson_amalgamation.o
|
||||
@@ -1620,14 +1621,11 @@
|
||||
|
||||
$(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c
|
||||
$(XTCC) $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) -c $(SRCDIR)/sqlite3.c -o $@
|
||||
|
||||
$(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h
|
||||
- $(XTCC) $(SHELL_OPTIONS) $(SHELL_CFLAGS) -DHAVE_LINENOISE -c $(SRCDIR)/shell.c -o $@
|
||||
-
|
||||
-$(OBJDIR)/linenoise.o: $(SRCDIR)/linenoise.c $(SRCDIR)/linenoise.h
|
||||
- $(XTCC) -c $(SRCDIR)/linenoise.c -o $@
|
||||
+ $(XTCC) $(SHELL_OPTIONS) $(SHELL_CFLAGS) -c $(SRCDIR)/shell.c -o $@
|
||||
|
||||
$(OBJDIR)/th.o: $(SRCDIR)/th.c
|
||||
$(XTCC) -c $(SRCDIR)/th.c -o $@
|
||||
|
||||
$(OBJDIR)/th_lang.o: $(SRCDIR)/th_lang.c
|
||||
|
||||
Index: src/makemake.tcl
|
||||
==================================================================
|
||||
--- src/makemake.tcl
|
||||
+++ src/makemake.tcl
|
||||
@@ -341,11 +341,10 @@
|
||||
|
||||
writeln [string map [list <<<NEXT_LINE>>> \\] {
|
||||
EXTRAOBJ = <<<NEXT_LINE>>>
|
||||
$(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) <<<NEXT_LINE>>>
|
||||
$(MINIZ_OBJ.$(FOSSIL_ENABLE_MINIZ)) <<<NEXT_LINE>>>
|
||||
- $(OBJDIR)/linenoise.o <<<NEXT_LINE>>>
|
||||
$(OBJDIR)/shell.o <<<NEXT_LINE>>>
|
||||
$(OBJDIR)/th.o <<<NEXT_LINE>>>
|
||||
$(OBJDIR)/th_lang.o <<<NEXT_LINE>>>
|
||||
$(OBJDIR)/th_tcl.o <<<NEXT_LINE>>>
|
||||
$(OBJDIR)/cson_amalgamation.o
|
||||
@@ -401,14 +402,11 @@
|
||||
|
||||
writeln "\$(OBJDIR)/sqlite3.o:\t\$(SRCDIR)/sqlite3.c"
|
||||
writeln "\t\$(XTCC) \$(SQLITE_OPTIONS) \$(SQLITE_CFLAGS) -c \$(SRCDIR)/sqlite3.c -o \$@\n"
|
||||
|
||||
writeln "\$(OBJDIR)/shell.o:\t\$(SRCDIR)/shell.c \$(SRCDIR)/sqlite3.h"
|
||||
-writeln "\t\$(XTCC) \$(SHELL_OPTIONS) \$(SHELL_CFLAGS) -DHAVE_LINENOISE -c \$(SRCDIR)/shell.c -o \$@\n"
|
||||
-
|
||||
-writeln "\$(OBJDIR)/linenoise.o:\t\$(SRCDIR)/linenoise.c \$(SRCDIR)/linenoise.h"
|
||||
-writeln "\t\$(XTCC) -c \$(SRCDIR)/linenoise.c -o \$@\n"
|
||||
+writeln "\t\$(XTCC) \$(SHELL_OPTIONS) \$(SHELL_CFLAGS) -c \$(SRCDIR)/shell.c -o \$@\n"
|
||||
|
||||
writeln "\$(OBJDIR)/th.o:\t\$(SRCDIR)/th.c"
|
||||
writeln "\t\$(XTCC) -c \$(SRCDIR)/th.c -o \$@\n"
|
||||
|
||||
writeln "\$(OBJDIR)/th_lang.o:\t\$(SRCDIR)/th_lang.c"
|
||||
|
||||
167
mingw-w64-fossil/win.patch
Normal file
167
mingw-w64-fossil/win.patch
Normal file
@@ -0,0 +1,167 @@
|
||||
diff -aur fossil-src-1.33.orig/Makefile.in fossil-src-1.33/Makefile.in
|
||||
--- fossil-src-1.33.orig/Makefile.in 2015-05-23 13:11:31.000000000 +0200
|
||||
+++ fossil-src-1.33/Makefile.in 2015-05-23 13:53:28.251995600 +0200
|
||||
@@ -38,7 +38,7 @@
|
||||
#
|
||||
TCLSH = tclsh
|
||||
|
||||
-LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@
|
||||
+LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@ -lws2_32
|
||||
TCCFLAGS = @EXTRA_CFLAGS@ @CPPFLAGS@ @CFLAGS@ -DHAVE_AUTOCONFIG_H -D_HAVE_SQLITE_CONFIG_H
|
||||
INSTALLDIR = $(DESTDIR)@prefix@/bin
|
||||
USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@
|
||||
diff -aur fossil-src-1.33.orig/src/checkin.c fossil-src-1.33/src/checkin.c
|
||||
--- fossil-src-1.33.orig/src/checkin.c 2015-05-23 13:11:31.000000000 +0200
|
||||
+++ fossil-src-1.33/src/checkin.c 2015-05-23 13:54:26.116750700 +0200
|
||||
@@ -859,15 +859,6 @@
|
||||
if( zEditor==0 ){
|
||||
zEditor = fossil_getenv("EDITOR");
|
||||
}
|
||||
-#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
- if( zEditor==0 ){
|
||||
- zEditor = mprintf("%s\\notepad.exe", fossil_getenv("SYSTEMROOT"));
|
||||
-#if defined(__CYGWIN__)
|
||||
- zEditor = fossil_utf8_to_filename(zEditor);
|
||||
- blob_add_cr(pPrompt);
|
||||
-#endif
|
||||
- }
|
||||
-#endif
|
||||
if( zEditor==0 ){
|
||||
blob_append(pPrompt,
|
||||
"#\n"
|
||||
@@ -885,9 +876,6 @@
|
||||
blob_str(&fname));
|
||||
blob_reset(&fname);
|
||||
}
|
||||
-#if defined(_WIN32)
|
||||
- blob_add_cr(pPrompt);
|
||||
-#endif
|
||||
blob_write_to_file(pPrompt, zFile);
|
||||
if( zEditor ){
|
||||
zCmd = mprintf("%s \"%s\"", zEditor, zFile);
|
||||
@@ -954,16 +942,7 @@
|
||||
int parent_rid
|
||||
){
|
||||
Blob prompt;
|
||||
-#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
- int bomSize;
|
||||
- const unsigned char *bom = get_utf8_bom(&bomSize);
|
||||
- blob_init(&prompt, (const char *) bom, bomSize);
|
||||
- if( zInit && zInit[0]){
|
||||
- blob_append(&prompt, zInit, -1);
|
||||
- }
|
||||
-#else
|
||||
blob_init(&prompt, zInit, -1);
|
||||
-#endif
|
||||
blob_append(&prompt,
|
||||
"\n"
|
||||
"# Enter a commit message for this check-in."
|
||||
diff -aur fossil-src-1.33.orig/src/db.c fossil-src-1.33/src/db.c
|
||||
--- fossil-src-1.33.orig/src/db.c 2015-05-23 13:11:31.000000000 +0200
|
||||
+++ fossil-src-1.33/src/db.c 2015-05-23 13:55:02.561878900 +0200
|
||||
@@ -928,41 +928,20 @@
|
||||
db_close_config();
|
||||
}
|
||||
zHome = fossil_getenv("FOSSIL_HOME");
|
||||
-#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
if( zHome==0 ){
|
||||
- zHome = fossil_getenv("LOCALAPPDATA");
|
||||
- if( zHome==0 ){
|
||||
- zHome = fossil_getenv("APPDATA");
|
||||
- if( zHome==0 ){
|
||||
- char *zDrive = fossil_getenv("HOMEDRIVE");
|
||||
- char *zPath = fossil_getenv("HOMEPATH");
|
||||
- if( zDrive && zPath ) zHome = mprintf("%s%s", zDrive, zPath);
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- if( zHome==0 ){
|
||||
- fossil_fatal("cannot locate home directory - please set the "
|
||||
- "FOSSIL_HOME, LOCALAPPDATA, APPDATA, or HOMEPATH "
|
||||
- "environment variables");
|
||||
+ zHome = fossil_getenv("HOME");
|
||||
}
|
||||
-#else
|
||||
if( zHome==0 ){
|
||||
- zHome = fossil_getenv("HOME");
|
||||
+ zHome = fossil_getenv("USERPROFILE");
|
||||
}
|
||||
if( zHome==0 ){
|
||||
fossil_fatal("cannot locate home directory - please set the "
|
||||
- "FOSSIL_HOME or HOME environment variables");
|
||||
+ "FOSSIL_HOME, USERPROFILE or HOME environment variables");
|
||||
}
|
||||
-#endif
|
||||
if( file_isdir(zHome)!=1 ){
|
||||
fossil_fatal("invalid home directory: %s", zHome);
|
||||
}
|
||||
-#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
- /* . filenames give some window systems problems and many apps problems */
|
||||
- zDbName = mprintf("%//_fossil", zHome);
|
||||
-#else
|
||||
zDbName = mprintf("%s/.fossil", zHome);
|
||||
-#endif
|
||||
if( file_size(zDbName)<1024*3 ){
|
||||
if( file_access(zHome, W_OK) ){
|
||||
fossil_fatal("home directory %s must be writeable", zHome);
|
||||
@@ -1446,12 +1425,13 @@
|
||||
if( zUser==0 ){
|
||||
#if defined(_WIN32)
|
||||
zUser = fossil_getenv("USERNAME");
|
||||
-#else
|
||||
- zUser = fossil_getenv("USER");
|
||||
+#endif
|
||||
+ if( zUser==0 ){
|
||||
+ zUser = fossil_getenv("USER");
|
||||
+ }
|
||||
if( zUser==0 ){
|
||||
zUser = fossil_getenv("LOGNAME");
|
||||
}
|
||||
-#endif
|
||||
}
|
||||
if( zUser==0 ){
|
||||
zUser = "root";
|
||||
@@ -2253,11 +2233,7 @@
|
||||
g.allowSymlinks = db_get_boolean("allow-symlinks", 0);
|
||||
}
|
||||
|
||||
-#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
-# define LOCALDB_NAME "./_FOSSIL_"
|
||||
-#else
|
||||
# define LOCALDB_NAME "./.fslckout"
|
||||
-#endif
|
||||
db_init_database(LOCALDB_NAME, zLocalSchema,
|
||||
#ifdef FOSSIL_LOCAL_WAL
|
||||
"COMMIT; PRAGMA journal_mode=WAL; BEGIN;",
|
||||
diff -aur fossil-src-1.33.orig/src/diffcmd.c fossil-src-1.33/src/diffcmd.c
|
||||
--- fossil-src-1.33.orig/src/diffcmd.c 2015-05-23 13:11:31.000000000 +0200
|
||||
+++ fossil-src-1.33/src/diffcmd.c 2015-05-23 13:53:28.276997700 +0200
|
||||
@@ -606,11 +606,7 @@
|
||||
const char *zName;
|
||||
|
||||
if( guiDiff ){
|
||||
-#if defined(_WIN32)
|
||||
- zDefault = "WinDiff.exe";
|
||||
-#else
|
||||
zDefault = 0;
|
||||
-#endif
|
||||
zName = "gdiff-command";
|
||||
}else{
|
||||
zDefault = 0;
|
||||
diff -aur fossil-src-1.33.orig/src/stash.c fossil-src-1.33/src/stash.c
|
||||
--- fossil-src-1.33.orig/src/stash.c 2015-05-23 13:11:31.000000000 +0200
|
||||
+++ fossil-src-1.33/src/stash.c 2015-05-23 13:53:28.278995500 +0200
|
||||
@@ -160,13 +160,7 @@
|
||||
if( zComment==0 ){
|
||||
Blob prompt; /* Prompt for stash comment */
|
||||
Blob comment; /* User comment reply */
|
||||
-#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
- int bomSize;
|
||||
- const unsigned char *bom = get_utf8_bom(&bomSize);
|
||||
- blob_init(&prompt, (const char *) bom, bomSize);
|
||||
-#else
|
||||
blob_zero(&prompt);
|
||||
-#endif
|
||||
blob_append(&prompt,
|
||||
"\n"
|
||||
"# Enter a description of what is being stashed. Lines beginning\n"
|
||||
Reference in New Issue
Block a user