Commit 16e4c673 authored by Alexander Reichle-Schmehl's avatar Alexander Reichle-Schmehl Committed by Markus Koschany

Imported Debian patch 1.7.9.debian.1-1

parent 68e50cb7
tofrodos (1.7.8.debian.1-2) unstable; urgency=low
With this release the symlinks "unix2dos" and "dos2unix" are dropped from the
package. This will allow the introduction of the original dos2unix package,
which also supports conversion to MacOS style files.
Should you have scripts depending on these symlinks, I recommend using
shell-aliases, like in the following example for bash:
alias unix2dos="/usr/bin/fromdos -u" (or todos)
alias dos2unix="/usr/bin/fromdos -d" (or just fromdos)
-- Alexander Reichle-Schmehl <tolimar@debian.org> Thu, 21 Jan 2010 20:59:11 +0100
This package uses quilt for patch management, for more information see
the file /usr/share/doc/quilt/README.source in the quilt package.
This diff is collapsed.
Source: tofrodos
Section: utils
Priority: optional
Maintainer: Alexander Reichle-Schmehl <tolimar@debian.org>
Build-Depends: debhelper (>= 5), quilt
Standards-Version: 3.9.2
Homepage: http://www.thefreecountry.com/tofrodos/index.shtml
Vcs-Svn: svn://svn.debian.org/svn/collab-maint/deb-maint/tofrodos/trunk/
Vcs-Browser: http://svn.debian.org/viewsvn/collab-maint/deb-maint/tofrodos/
Package: tofrodos
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Conflicts: sysutils (<= 2.0.0-1)
Description: Converts DOS <-> Unix text files, alias tofromdos
DOS text files traditionally have CR/LF (carriage return/line feed) pairs
as their new line delimiters while Unix text files traditionally have
LFs (line feeds) to terminate each line.
.
Tofrodos comprises one program, "fromdos" alias "todos", which converts
text files to and from these formats. Use "fromdos" to convert DOS
text files to the Unix format, and "todos" to convert Unix text files
to the DOS format.
This package was debianized by Alexander Schmehl <tolimar@debian.org> on
Sun, 24 Feb 2008 17:53:08 +0100.
It is based on the package formerly maintained by Florian Ernst
<florian@debian.org>.
It was downloaded from <http://www.thefreecountry.com/tofrodos/index.shtml>
The only change to the original source tarball is the removal of fromdos.exe
and todos.exe.
Upstream Author:
Christopher Heng
Copyright:
Copyright (C) 1996-2005 Christopher Heng
License:
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this package; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
On Debian systems, the complete text of the GNU General Public License version
2 can be found in `/usr/share/common-licenses/GPL-2'.
The Debian packaging is (C) 2008, Alexander Schmehl <tolimar@debian.org> and is
licensed under the GPL-2, see above.
readme.txt
## 02_FTBFS_non-linux.dpatch by Guillem Jover <guillem@debian.org>
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix FTBFS on non Linux systems
---
src/config.h | 4 +++-
src/tofrodos.c | 13 ++++++++++---
2 files changed, 13 insertions(+), 4 deletions(-)
--- a/src/config.h
+++ b/src/config.h
@@ -102,7 +102,9 @@ extern "C" {
#endif
#endif
-#if defined(__FreeBSD__) || defined(__OpenBSD__) /* seems to work like Linux... */
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \
+ defined(__OpenBSD__) || defined(__NetBSD__) || \
+ defined(__GNU__) /* seems to work like Linux... */
#if !defined(LINUX)
#define LINUX
#endif
--- a/src/tofrodos.c
+++ b/src/tofrodos.c
@@ -443,7 +443,7 @@ static int convert ( FILE * infp, FILE *
static int openandconvert_preamble ( char * filename )
{
struct stat statbuf ;
- char realfilepath[MAXPATHLEN+1] ;
+ char *realfilepath ;
int len ;
/* get the file information */
@@ -461,16 +461,23 @@ static int openandconvert_preamble ( cha
/* eg, #define S_ISLNK(x) (((x) & S_IFMT) == S_IFLNK) */
/* or something like that. */
- if ((len = readlink( filename, realfilepath, (sizeof(realfilepath) - 1) )) != -1) {
+ realfilepath = xmalloc( statbuf.st_size + 1 );
+
+ if ((len = readlink( filename, realfilepath, statbuf.st_size )) != -1) {
+ int ret ;
+
/* got to null terminate the string - there is always space because */
/* we passed readlink() the size of the buffer less 1. */
realfilepath[len] = '\0' ;
if (verbose) {
emsg( VERBOSE_SYMLINKSRC, filename, realfilepath );
}
- return openandconvert( realfilepath );
+ ret = openandconvert( realfilepath );
+ free( realfilepath );
+ return ret;
}
emsg( EMSG_SYMLINK, filename );
+ free( realfilepath );
return -1 ;
}
/* If we reach here, "filename" is not a symbolic link */
FTBFS_non-linux.diff
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
#export DH_VERBOSE=1
PACKAGE = $(shell dh_listpackages)
TMPDIR = $(CURDIR)/debian/$(PACKAGE)
INSTALL = install
CFLAGS = -Wall -g
CFLAGS+=$(shell getconf LFS_CFLAGS)
LDFLAGS+=$(shell getconf LFS_LDFLAGS)
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
include /usr/share/quilt/quilt.make
build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp: patch
dh_testdir
cd $(CURDIR)/src && $(MAKE) CDEBUG="$(CFLAGS)" LDEBUG="-g"
touch $@
clean: unpatch
dh_testdir
dh_testroot
rm -f build-stamp
cd $(CURDIR)/src && $(MAKE) -i distclean
dh_clean
install: build
dh_testdir
dh_testroot
dh_installdirs usr/bin usr/share/man/man1
cd $(CURDIR)/src && $(MAKE) install BINDIR="$(TMPDIR)/usr/bin" MANDIR="$(TMPDIR)/usr/share/man/man1"
binary-indep: build install
# We have nothing to do by default.
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs tofrodos.html
dh_installman
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
version=3
opts=dversionmangle=s/\.debian\.\d+$// \
http://www.thefreecountry.com/tofrodos/index.shtml \
http://tofrodos.sourceforge.net/download/tofrodos-([\d\.]+)\.tar\.gz
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment