gnu: libtool: Restore shebangs on all libtoolize files.
Fixes <https://bugs.gnu.org/25304>. * gnu/packages/autotools.scm (libtool)[restore-build-aux-shebang]: New phase after install. [restore-ltmain-shebang]: Remove phase, it is now performed by the phase restore-build-aux-shebang.
This commit is contained in:
		
							parent
							
								
									dbb4c665e4
								
							
						
					
					
						commit
						8d263ff254
					
				
					 1 changed files with 13 additions and 5 deletions
				
			
		| 
						 | 
					@ -444,11 +444,19 @@ Makefile, simplifying the entire process for the developer.")
 | 
				
			||||||
               (("/bin/sh")
 | 
					               (("/bin/sh")
 | 
				
			||||||
                (string-append bash "/bin/sh")))
 | 
					                (string-append bash "/bin/sh")))
 | 
				
			||||||
             #t)))
 | 
					             #t)))
 | 
				
			||||||
         (add-after 'patch-source-shebangs 'restore-ltmain-shebang
 | 
					         ;; These files may be copied into source trees by libtoolize,
 | 
				
			||||||
           (lambda* (#:key inputs #:allow-other-keys)
 | 
					         ;; therefore they must not point to store file names that would be
 | 
				
			||||||
             (substitute* "build-aux/ltmain.in"
 | 
					         ;; leaked with tarballs generated by make dist.
 | 
				
			||||||
               (("^#!.*/bin/sh$") "#!/bin/sh"))
 | 
					         (add-after 'install 'restore-build-aux-shebang
 | 
				
			||||||
             #t)))))
 | 
					           (lambda* (#:key outputs #:allow-other-keys)
 | 
				
			||||||
 | 
					             (let* ((out (assoc-ref outputs "out"))
 | 
				
			||||||
 | 
					                    (dir (string-append out "/share/libtool/build-aux")))
 | 
				
			||||||
 | 
					               (for-each (lambda (file)
 | 
				
			||||||
 | 
					                           (format #t "restoring shebang on `~a'~%" file)
 | 
				
			||||||
 | 
					                           (substitute* file
 | 
				
			||||||
 | 
					                             (("^#!.*/bin/sh") "#!/bin/sh")))
 | 
				
			||||||
 | 
					                         (find-files dir ".*"))
 | 
				
			||||||
 | 
					               #t))))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    (synopsis "Generic shared library support tools")
 | 
					    (synopsis "Generic shared library support tools")
 | 
				
			||||||
    (description
 | 
					    (description
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue