You are not logged in.

#1 2009-02-28 03:52:27

Raccoon1400
Member
From: Ontario, Canada
Registered: 2008-04-14
Posts: 853

Help with patch

when I use this patch to fix this source, this happens.
I don't know much about this sort of thing.
http://proj.phk.at/el/6/

diff -urB enemylines6-1.1/c3_tpl.h enemylinepatched/c3_tpl.h
--- enemylines6-1.1/c3_tpl.h    2006-03-30 18:16:47.000000000 +0200
+++ enemylinepatched/c3_tpl.h    2008-06-27 17:34:32.000000000 +0200
@@ -1,6 +1,7 @@
 #include <iostream>
 #include <sstream>
 #include <utility>
+#include <limits>
 #include <cmath>

diff -urB enemylines6-1.1/random.cc enemylinepatched/random.cc
--- enemylines6-1.1/random.cc    2006-03-30 18:16:47.000000000 +0200
+++ enemylinepatched/random.cc    2008-06-27 17:35:03.000000000 +0200
@@ -1,5 +1,6 @@
 #include "random.h"
 
+#include <cstdlib>
 #include <iostream>
==> Starting build()...
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -urB enemylines6-1.1/c3_tpl.h enemylinepatched/c3_tpl.h
|--- enemylines6-1.1/c3_tpl.h    2006-03-30 18:16:47.000000000 +0200
|+++ enemylinepatched/c3_tpl.h    2008-06-27 17:34:32.000000000 +0200
--------------------------
File to patch: ^C
==> ERROR: Aborted by user! Exiting...

Fustrated Windows users have two options.
1. Resort to the throwing of computers out of windows.
2. Resort to the throwing of windows out of computers.

Offline

#2 2009-02-28 04:16:03

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Help with patch

use:
patch -p1
to apply the patch. If that doesn't  work, post the PKGBUILD.

Offline

#3 2009-02-28 05:09:41

Raccoon1400
Member
From: Ontario, Canada
Registered: 2008-04-14
Posts: 853

Re: Help with patch

pkgname=enemylines6
pkgver=1.1
pkgrel=1
pkgdesc="Semi-abstract first person 3d-shooter game."
arch=('i686' 'x86_64')
url="http://proj.phk.at/el/6/"
license=('GPL')
depends=('sdl' 'sdl_mixer' 'sdl_ttf' 'curl')
makedepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
source=(http://proj.phk.at/el/6/$pkgname-$pkgver.tar.bz2
        enemylines_gcc43.patch)
noextract=()
#md5sums=('0d190a6542dc8c64624816206c205144'
#         'bde297847db619abeb3ae5f4a91397fb')

build() {
  cd "$srcdir"
  patch -p1 -i enemylines_gcc43.patch || return 1
  cd "$pkgname-$pkgver"
  make || return 1
  make DESTDIR="$pkgdir/usr" install
}

# vim:set ts=2 sw=2 et:

Fustrated Windows users have two options.
1. Resort to the throwing of computers out of windows.
2. Resort to the throwing of windows out of computers.

Offline

#4 2009-02-28 09:18:37

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Help with patch

change:
  cd "$srcdir"
  patch -p1 -i enemylines_gcc43.patch || return 1
  cd "$pkgname-$pkgver"
to:
  cd "$srcdir/$pkgname-$pkgver"
  patch -p1 < ../enemylines_gcc43.patch || return 1

Offline

#5 2009-02-28 16:42:55

Raccoon1400
Member
From: Ontario, Canada
Registered: 2008-04-14
Posts: 853

Re: Help with patch

now I have

build() {
  cd "$srcdir/$pkgname-$pkgver"
  patch -p1 < ../enemylines_gcc43.patch || return 1
  make || return 1
  make DESTDIR="$pkgdir/usr" install
}

and it gives same error


Fustrated Windows users have two options.
1. Resort to the throwing of computers out of windows.
2. Resort to the throwing of windows out of computers.

Offline

#6 2009-03-02 04:00:54

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Help with patch

the patch you gave above is malformed. Use:

diff -urB enemylines6-1.1/math/c3_tpl.h enemylinepatched/math/c3_tpl.h
--- enemylines6-1.1/math/c3_tpl.h    2006-03-30 18:16:47.000000000 +0200
+++ enemylinepatched/math/c3_tpl.h    2008-06-27 17:34:32.000000000 +0200
@@ -1,6 +1,7 @@
 #include <iostream>
 #include <sstream>
 #include <utility>
+#include <limits>
 #include <cmath>


--- enemylines6-1.1/random.cc    2006-03-30 18:16:47.000000000 +0200
+++ enemylinepatched/random.cc    2008-06-27 17:35:03.000000000 +0200
@@ -1,3 +1,4 @@
 #include "random.h"
 
+#include <cstdlib>
 #include <iostream>

Offline

Board footer

Powered by FluxBB