build: add PKGBUILD for libx11 with msan support #44
					 1 changed files with 40 additions and 0 deletions
				
			
		
							
								
								
									
										40
									
								
								tools/pacman/libx11_msan/PKGBUILD
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								tools/pacman/libx11_msan/PKGBUILD
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,40 @@
 | 
				
			||||||
 | 
					# Modified version of the official `pacman` PKGBUILD for libx11 with msan support
 | 
				
			||||||
 | 
					# original: https://gitlab.archlinux.org/archlinux/packaging/packages/libx11/-/blob/main/PKGBUILD?ref_type=heads"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					pkgname=libx11
 | 
				
			||||||
 | 
					pkgver=1.8.12
 | 
				
			||||||
 | 
					pkgrel=1
 | 
				
			||||||
 | 
					pkgdesc="X11 client-side library"
 | 
				
			||||||
 | 
					arch=(x86_64)
 | 
				
			||||||
 | 
					url="https://gitlab.freedesktop.org/xorg/lib/libx11"
 | 
				
			||||||
 | 
					depends=('libxcb' 'glibc' 'xorgproto')
 | 
				
			||||||
 | 
					makedepends=('xorg-util-macros' 'xtrans' 'clang')
 | 
				
			||||||
 | 
					license=('MIT AND X11')
 | 
				
			||||||
 | 
					source=(https://xorg.freedesktop.org//releases/individual/lib/libX11-${pkgver}.tar.xz{,.sig})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					build() {
 | 
				
			||||||
 | 
					  cd libX11-${pkgver}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ### msan ###
 | 
				
			||||||
 | 
					  clang --version
 | 
				
			||||||
 | 
					  export CC="$(which clang) -fno-omit-frame-pointer -g -fsanitize=memory -fsanitize-memory-track-origins"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ./configure --prefix=/usr \
 | 
				
			||||||
 | 
					    --disable-static \
 | 
				
			||||||
 | 
					    --disable-xf86bigfont
 | 
				
			||||||
 | 
					  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
 | 
				
			||||||
 | 
					  make
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					check() {
 | 
				
			||||||
 | 
					  cd libX11-${pkgver}
 | 
				
			||||||
 | 
					  make check
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package() {
 | 
				
			||||||
 | 
					  cd "libX11-${pkgver}"
 | 
				
			||||||
 | 
					  make DESTDIR="${pkgdir}" install
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  install -d -m755 "${pkgdir}/usr/share/licenses/${pkgname}"
 | 
				
			||||||
 | 
					  install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue